ForgeTrust.Runnable.Core/Extensions/EnumerableExtensions.cs
EnumerableExtensions
Type
EnumerableExtensions
Provides extension methods for to perform parallel operations.
Method
ParallelSelectAsync<TSource, TResult>(this IEnumerable<TSource>, Func<TSource, CancellationToken, Task<TResult>>, int, CancellationToken)
Projects each element of a sequence into a new form with bounded concurrency and preserves the input order of results.
Exceptions thrown by the function propagate to the returned task.
Method
ParallelSelectAsync<TSource, TResult>(this IEnumerable<TSource>, Func<TSource, Task<TResult>>, int, CancellationToken)
Produces an async sequence of results projected from each element of , yielding results in the original input order while limiting concurrent selector executions.
Method
ParallelSelectAsyncEnumerable<TSource, TResult>(this IEnumerable<TSource>, Func<TSource, CancellationToken, Task<TResult>>, int, int, CancellationToken)
Produces an asynchronous sequence of results by applying to each element of , limiting concurrency to and preserving the input order.
The internal channel capacity is capped at maxDegreeOfParallelism * bufferMultiplier.
Method
ParallelSelectAsyncEnumerable<TSource, TResult>(this IEnumerable<TSource>, Func<TSource, Task<TResult>>, int, int, CancellationToken)
Projects each element of using the provided task-returning selector with bounded concurrency and yields the results in the same order as the source.