Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: IEnumerable<TResult> ParallelSelect<TSource, TResult>(this IEnumerable<TSource>, int, Func<TSource, TResult>)

  • Declared in: RT.Util.Ut

Declaration

public static IEnumerable<TResult> ParallelSelect<TSource, TResult>(
    this IEnumerable<TSource> items,
    int maxSimultaneous,
    Func<TSource, TResult> selector
)

Summary

Runs the specified function in parallel for each item in the input collection and returns a collection containing the results of the function calls.

Generic type parameters

TSource The type of the elements of items.
TResult The type of the elements returned by selector.

Parameters

this IEnumerable<TSource>items Input collection of items to pass to the function.
intmaxSimultaneous Maximum number of concurrent threads allowed.
Func<TSource, TResult>selector Function that returns a result object for each input item.