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

Nick Chapsas
Nick Chapsas
100.5 هزار بار بازدید - 3 سال پیش - Become a Patreon and get
Become a Patreon and get source code access: Patreon: nickchapsas
Check out my courses: https://dometrain.com

Hello everybody I'm Nick and 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: Medium: parallel-foreach-async-in-c

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

Don't forget to comment, like and subscribe :)

Social Media:
Follow me on GitHub: http://bit.ly/ChapsasGitHub
Follow me on Twitter: http://bit.ly/ChapsasTwitter
Connect on LinkedIn: http://bit.ly/ChapsasLinkedIn

Keep coding merch: https://keepcoding.shop

#dotnet #parallel #csharp
3 سال پیش در تاریخ 1400/03/31 منتشر شده است.
100,553 بـار بازدید شده
... بیشتر