In this video I am going to talk about the Parallel class in .NET and see how it performs compared to other methods and how we can modernize it for 2021. There are going to be intresteing gotchas about multi-threading and concurrency so buckle up and let’s jump into it.

Async Parallel blog: https://medium.com/@alex.puiu/parallel-foreach-async-in-c-36756f8ebe62

Timestamps

  • Intro - 0:00
  • Parallel does not mean faster - 0:43
  • API benchmark for vs Parallel.For - 2:41
  • Adding Task.WhenAll in the mix - 7:40
  • Making the Parallel.ForEach method async - 11:11

#csharp #dotnet #developer

Is Parallel.For/ForEach in C# actually worth it? (and how to modernize it)
2.85 GEEK