Skip to content

ScheduledTask.WhenAllCompleted(IReadOnlyList<ScheduledTask>, CancellationToken)

WhenAllCompleted(IReadOnlyList<ScheduledTask>, CancellationToken)

static
View source
public static Task<ScheduledTask[]> WhenAllCompleted(IReadOnlyList<ScheduledTask> tasks, CancellationToken cancellationToken = default(CancellationToken))
Waits until every scheduled task is terminal, and returns the tasks in input order.

Parameters

tasksIReadOnlyList<ScheduledTask>
The tasks, which are captured when this method is called.
cancellationTokenCancellationToken
A token which abandons the wait. It doesn't cancel the tasks.

Returns

The tasks, in input order. Each has observed its terminal response, so ScheduledTask, ScheduledTask, and Orleans.Durable.Tasks.ScheduledTask.TryGetResult inspect it.