Companion

object Companion

Properties

Link copied to clipboard

Suspends indefinitely until cancelled.

Functions

Link copied to clipboard
fun <T> all(vararg deferred: Deferred<T>): Awaitable<List<T>>
fun <T> all(deferred: List<Deferred<T>>): Awaitable<List<T>>

Suspends until all deferred are completed and returns results as a List.

Link copied to clipboard
fun delayed(by: Duration = 1.seconds): Awaitable<Unit>

Suspends for the specified duration and returns Unit.

fun <T> delayed(value: T, by: Duration = 1.seconds): Awaitable<T>

Suspends for the specified duration and returns value.

fun <T> delayed(by: Duration = 1.seconds, valueProvider: suspend SuspendCallDefinitionScope<T>.(CallArgs) -> T): Awaitable<T>

Suspends for the specified duration and returns value provided on each call by valueProvider.

Link copied to clipboard
fun <T> receive(from: ReceiveChannel<T>): Awaitable<T>

Suspends until an element is received from the channel.

Link copied to clipboard
fun <T> send(to: SendChannel<T>, valueProvider: suspend SuspendCallDefinitionScope<T>.(CallArgs) -> T): Awaitable<Unit>

Suspends until a value provided on each call by the valueProvider is sent to the channel.