Skip to content

DurableTask.WhenAny(IReadOnlyList<DurableTask>)

WhenAny(IReadOnlyList<DurableTask>)

static
View source
public static DurableTask<int> WhenAny(IReadOnlyList<DurableTask> tasks)
Creates a durable task which returns the input index of the first input task to complete.

Parameters

tasksIReadOnlyList<DurableTask>
The input tasks.

Returns

A combinator which, awaited within a durable execution, runs as part of that execution.

Exceptions

System.ArgumentOutOfRangeException
tasks is empty.