class AsyncConditionVariable
source · line 4public
public class AsyncConditionVariable public constructor(public val mutex: AsyncMutex)
A condition associated with one mutex. Always test the protected predicate in a loop.
function signal
source · line 38public
public fun signal(guard: AsyncMutexGuard): Unit
Selects the oldest waiter while holding this condition's mutex.
parameter guard
source · line 38public
guard: AsyncMutexGuard
constructor constructor
source · line 4public
constructor(public val mutex: AsyncMutex)
parameter mutex
source · line 4public
public val mutex: AsyncMutex
property mutex
source · line 4public
public val mutex: AsyncMutex
get: public read-only
function broadcast
source · line 51public
public fun broadcast(guard: AsyncMutexGuard): Unit
Selects all current waiters in registration order. Notifications are not saved.
parameter guard
source · line 51public
guard: AsyncMutexGuard
function await
source · line 8public
public suspend fun await(guard: AsyncMutexGuard): Unit
Atomically releases the guard; reacquires that same guard before returning or throwing.
parameter guard
source · line 8public
guard: AsyncMutexGuard