System.Threading.Tasks.Task.WaitAny Method

Waits for any of the provided cancellable System.Threading.Tasks.Task objects to complete execution.

Syntax

public static int WaitAny (Task[] tasks, System.Threading.CancellationToken cancellationToken)

Parameters

tasks
An array of System.Threading.Tasks.Task instances on which to wait.
cancellationToken
A TaskFactory.CancellationToken to observe while waiting for a task to complete.

Returns

The index of the completed task in the tasks array argument.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System.Threading.Tasks
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0