Click or drag to resize

TaskUtilitiesRunTasksInParallelT Method (IEnumerableT, FuncT, Task, Int32)

Runs a list of tasks in parallel on a list of work items .

Namespace:  callback.ShellBoost.Core.Utilities
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public static Task RunTasksInParallel<T>(
	IEnumerable<T> workItems,
	Func<T, Task> work,
	int maxDegreeOfParallelism = 0
)

Parameters

workItems
Type: System.Collections.GenericIEnumerableT
The work items.
work
Type: SystemFuncT, Task
The work function.
maxDegreeOfParallelism (Optional)
Type: SystemInt32
The maximum degree of parallelism. Zero or a negative number means infinite.

Type Parameters

T
The work item type.

Return Value

Type: Task
An instance of the Task class.
Exceptions
ExceptionCondition
ArgumentNullExceptionworkItems or work is null.
See Also