Skip to content

DurableTask.WhenEach(IReadOnlyList<DurableTask>)

WhenEach(IReadOnlyList<DurableTask>)

static
View source
public static IAsyncEnumerable<ScheduledTask> WhenEach(IReadOnlyList<DurableTask> tasks)
Schedules every input task and yields each input's handle once, in completion order, as the input reaches a terminal state.

Parameters

tasksIReadOnlyList<DurableTask>
The input tasks, which are captured when this method is called.

Returns

The inputs' handles in completion order. Each yielded handle has observed its terminal response, including a failure or a cancellation, which doesn't fail the enumeration.

Exceptions

System.InvalidOperationException
The method is called outside a durable execution.