concurrent-coroutines / org.apache.tuweni.concurrent.coroutines / kotlinx.coroutines.Deferred

Extensions for kotlinx.coroutines.Deferred

asAsyncCompletion

fun Deferred<Unit>.asAsyncCompletion(): AsyncCompletion

Converts this deferred value to a AsyncCompletion. The deferred value is cancelled when the returned AsyncCompletion is cancelled or otherwise completed.

asAsyncResult

fun <T> Deferred<T>.asAsyncResult(): AsyncResult<T>

Converts this deferred value to an AsyncResult. The deferred value is cancelled when the returned AsyncResult is cancelled or otherwise completed.