Skip to content

ScheduledTask.WhenAllCompleted(IReadOnlyList<ScheduledTask<TResult>>, CancellationToken)

WhenAllCompleted(IReadOnlyList<ScheduledTask<TResult>>, CancellationToken)

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

Parameters

tasksIReadOnlyList<ScheduledTask<TResult>>
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.