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.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
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