WhenAny(IReadOnlyList<ScheduledTask>, CancellationToken)
static
public static Task<ScheduledTask> WhenAny(IReadOnlyList<ScheduledTask> tasks, CancellationToken cancellationToken = default(CancellationToken)) Returns the first scheduled task whose response completes, including failed or canceled durable responses. Wait cancellation and transport failures are propagated, and losing waits are canceled without canceling the durable tasks. Candidates are captured when this method is called.
Parameters
tasksIReadOnlyList<ScheduledTask>cancellationTokenCancellationToken
Exceptions
System.ArgumentOutOfRangeExceptiontasksis empty.System.InvalidOperationException- The host's wait for the selected task returned an incomplete response.
