onAwait

abstract val onAwait: SelectClause1<T>(source)

Clause using the await suspending function as a select clause. It selects with the deferred value when the Deferred completes. If Deferred completes with an exception, the whole the select invocation fails with the same exception. Note that, if Deferred completed with a CancellationException, throwing it may have unintended consequences. See await for details.