Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: void ParallelForEach<T>(this IEnumerable<T>, int, Action<T>)

  • Declared in: RT.Util.Ut

Declaration

public static void ParallelForEach<T>(
    this IEnumerable<T> items,
    int maxSimultaneous,
    Action<T> action
)

Summary

Runs the specified action in parallel for each item in the input collection, using no more than the specified maximum number of threads.

Generic type parameters

T Type of the items in the collection.

Parameters

this IEnumerable<T>items Input collection of items to pass to the action.
intmaxSimultaneous Maximum number of concurrent threads allowed.
Action<T>action Action to run for each element.