Await the "completed" state of an Awaitable.
Await the "completed" state of an Awaitable.
Although this method is blocking, the internal use of blocking ensures that the underlying ExecutionContext is prepared to properly manage the blocking.
the Awaitable to be awaited
maximum wait time, which may be negative (no waiting is done), Duration.Inf for unbounded waiting, or a finite positive duration
the awaitable
if atMost is Duration.Undefined
if the current thread is interrupted while waiting
TimeoutExceptionif after waiting for the specified time this Awaitable is still not ready
Await and return the result (of type T) of an Awaitable.
Await and return the result (of type T) of an Awaitable.
Although this method is blocking, the internal use of blocking ensures that the underlying ExecutionContext to properly detect blocking and ensure that there are no deadlocks.
the Awaitable to be awaited
maximum wait time, which may be negative (no waiting is done), Duration.Inf for unbounded waiting, or a finite positive duration
the result value if awaitable is completed within the specific maximum wait time
if atMost is Duration.Undefined
if the current thread is interrupted while waiting
TimeoutExceptionif after waiting for the specified time awaitable is still not ready
Awaitis what is used to ensure proper handling of blocking forAwaitableinstances.