ForEachAsync with Result
Now that the Parallel.ForEachAsync API has become part of the standard libraries (.NET 6), it makes sense to implement a variant that returns a Task<TResult[]>, based on this API. Here is an implementation: /// <summary> /// Executes a foreach loop on an enumerable sequence, in which iterations may run /// in parallel, and returns the … Read more