Extensions for kotlinx.coroutines.experimental.Deferred

asCompletableFuture

fun <T> Deferred<T>.asCompletableFuture(): CompletableFuture<T>

Converts this deferred value to the instance of CompletableFuture. The deferred value is cancelled when the resulting future is cancelled or otherwise completed.