Vai al contenuto

Archivio:

C#

Speed up loop with ForEachAsync

I’m reposting an useful old post by Stephen Toub. ForEach loop doesn’t supports Async/Await operators. If you like the possibility to have a foreach loop that can run in parallel, and can also leverage async/await operators to improve the performances of your loop, you can use the following, very useful, extension method. Usage: Example: You […]