Package-level declarations

Functions

Link copied to clipboard
fun <T> <Error class: unknown class><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.

fun <Error class: unknown class>.asCompletableFuture(): CompletableFuture<Unit>

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

Link copied to clipboard
fun <T> CompletionStage<T>.asDeferred(): <Error class: unknown class><T>

Converts this CompletionStage to an instance of Deferred.

Link copied to clipboard
suspend fun <T> CompletionStage<T>.await(): T

Awaits for completion of CompletionStage without blocking a thread.

Link copied to clipboard
fun <T> <Error class: unknown class>.future(context: CoroutineContext = EmptyCoroutineContext, start: <Error class: unknown class> = CoroutineStart.DEFAULT, block: suspend <Error class: unknown class>.() -> T): CompletableFuture<T>

Starts a new coroutine and returns its result as an implementation of CompletableFuture. The running coroutine is cancelled when the resulting future is cancelled or otherwise completed.