Race(IEnumerable<DurableTask>)
staticextension
public static DurableTask<int> Race(this IEnumerable<DurableTask> tasks) Creates a durable task which returns the input index of the first input task to complete, after requesting cancellation of every other input and waiting until each is terminal.
Parameters
tasksIEnumerable<DurableTask>- The input tasks, which are captured when this method is called.
Returns
A combinator which, awaited within a durable execution, runs as part of that execution.
Exceptions
System.ArgumentOutOfRangeExceptiontasksis empty.
