Package kotlinx.coroutines.selects
Select expression to perform multiple suspending operations simultaneously until one of them succeeds.
Types
Link copied to clipboard
Scope for select invocation.
Link copied to clipboard
Clause for select expression without additional parameters that does not select any value.
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
inline suspend fun <R> select(crossinline builder: SelectBuilder<R>.() -> Unit): R
Content copied to clipboard
Waits for the result of multiple suspending functions simultaneously, which are specified using clauses in the builder scope of this select invocation. The caller is suspended until one of the clauses is either selected or fails.
Link copied to clipboard
inline suspend fun <R> selectUnbiased(crossinline builder: SelectBuilder<R>.() -> Unit): R
Content copied to clipboard
Waits for the result of multiple suspending functions simultaneously like select, but in an unbiased way when multiple clauses are selectable at the same time.
Link copied to clipboard
inline suspend fun whileSelect(crossinline builder: SelectBuilder<Boolean>.() -> Unit)
Content copied to clipboard
Loops while select expression returns true
.