Click or drag to resize

AsyncHelpersForEachItemInParallelT Method

Iterates over all items in the given collection and runs the specified action in parallel (each action executes on a thread from thread pool).

Namespace:  NLog.Common
Assembly:  NLog (in NLog.dll) Version: 5.3.1+cf6675da40ccfd4c8c526a3b2bdbeed3442910a1
Syntax
public static void ForEachItemInParallel<T>(
	IEnumerable<T> values,
	AsyncContinuation asyncContinuation,
	AsynchronousAction<T> action
)

Parameters

values
Type: System.Collections.GenericIEnumerableT
The items to iterate.
asyncContinuation
Type: NLog.CommonAsyncContinuation
The asynchronous continuation to invoke once all items have been iterated.
action
Type: NLog.CommonAsynchronousActionT
The action to invoke for each item.

Type Parameters

T
Type of each item.
See Also