WaitUntilAsync(DateTimeOffset, CancellationToken)
public Task<TResult> WaitUntilAsync(DateTimeOffset dueTime, CancellationToken cancellationToken = default(CancellationToken)) Waits for and returns the successful result, and requests durable cancellation of the task once
dueTime passes. Parameters
dueTimeDateTimeOffset- The time at which to request cancellation. A time which has passed times out promptly.
cancellationTokenCancellationToken- A token which abandons the wait. It doesn't cancel the task.
Returns
The task's result, including a result which it returns after observing the deadline's cancellation request.
Exceptions
System.ArgumentOutOfRangeException- Outside a durable execution, the time until
dueTimeexceeds the longest timer interval whichSystem.Threading.CancellationTokenSource.CancelAfteraccepts. System.TimeoutException- The due time passed, and the task ended canceled.
