Skip to content

DurableTaskExtensions.WhenEach(IReadOnlyList<ScheduledTask<TResult>>)

WhenEach(IReadOnlyList<ScheduledTask<TResult>>)

staticextension
View source
public static IAsyncEnumerable<ScheduledTask<TResult>> WhenEach<TResult>(this IReadOnlyList<ScheduledTask<TResult>> tasks)
Yields each scheduled task once, in completion order, as it reaches a terminal state.

Parameters

tasksIReadOnlyList<ScheduledTask<TResult>>
The tasks, which are captured when this method is called.

Returns

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