Since the API you're calling is async, the Parallel.ForEach
version doesn't make much sense. You shouldnt use .Wait
in the WaitAll
version since that would lose the parallelism Another alternative if the caller is async is using Task.WhenAll
after doing Select
and ToArray
to generate the array of tasks. A second alternative is using Rx 2.0