SelectBuilder

interface SelectBuilder<in R>

Scope for select invocation.

Functions

invoke
Link copied to clipboard
abstract operator fun SelectClause0.invoke(block: suspend () -> R)

Registers a clause in this select expression without additional parameters that does not select any value.

abstract operator fun <Q> SelectClause1<Q>.invoke(block: suspend (Q) -> R)

Registers clause in this select expression without additional parameters that selects value of type Q.

open operator fun <P, Q> SelectClause2<P?, Q>.invoke(block: suspend (Q) -> R)

Registers clause in this select expression with additional nullable parameter of type P with the null value for this parameter that selects value of type Q.

abstract operator fun <P, Q> SelectClause2<P, Q>.invoke(param: P, block: suspend (Q) -> R)

Registers clause in this select expression with additional parameter of type P that selects value of type Q.

onTimeout
Link copied to clipboard
abstract fun onTimeout(timeMillis: Long, block: suspend () -> R)

Clause that selects the given block after a specified timeout passes. If timeout is negative or zero, block is selected immediately.

Extensions

onTimeout
Link copied to clipboard
fun <R> SelectBuilder<R>.onTimeout(timeout: Duration, block: suspend () -> R)

Clause that selects the given block after the specified timeout passes. If timeout is negative or zero, block is selected immediately.

Sources

common source
Link copied to clipboard