Package-level declarations

Types

Link copied to clipboard
class Deferred<T>

A typed result of cooperative work. Repeated awaits retain the same value or task exception.

Link copied to clipboard
value class Task

A bounded cooperative Guest task.

Link copied to clipboard
object Tasks

Starts bounded cooperative work within the current VM.

Functions

Link copied to clipboard
fun <T> async(block: () -> T): Deferred<T>

Starts block in the existing bounded cooperative task scheduler.

Link copied to clipboard
fun <T> awaitAll(deferred: List<Deferred<T>>): List<T>

Awaits in list order and preserves that order in the returned values.

fun <T> awaitAll(vararg deferred: Deferred<T>): List<T>

Awaits in argument order; a failed await throws without cancelling the remaining tasks.