DoxigAlpha

broadcast

Unblocks all threads currently blocked in a call to wait() or timedWait() with a given Mutex. The blocked threads must be sequenced before this call with respect to acquiring the same Mutex in order to be observable for unblocking. broadcast() can be called with or without the relevant Mutex being acquired and have no "effect" if there's no observable blocked threads.

Function parameters

Parameters

#
self:*Condition

Atomically releases the Mutex, blocks the caller thread, then re-acquires the Mutex on return.

Functions

#
wait
Atomically releases the Mutex, blocks the caller thread, then re-acquires the Mutex on return.
timedWait
Atomically releases the Mutex, blocks the caller thread, then re-acquires the Mutex on return.
signal
Unblocks at least one thread blocked in a call to `wait()` or `timedWait()` with a given Mutex.
broadcast
Unblocks all threads currently blocked in a call to `wait()` or `timedWait()` with a given Mutex.

Source

Implementation

#
pub fn broadcast(self: *Condition) void {
    self.impl.wake(.all);
}