FIXME: This isn’t documented in Nutshell.
Since MonitorMixin.new_cond
returns a ConditionVariable
, and the example above calls while_wait and signal, this class should be documented.
Methods
- B
- N
- S
- W
Class Public methods
new(monitor) Link
Instance Public methods
broadcast() Link
Wakes up all threads waiting for this lock.
signal() Link
Wakes up the first thread in line waiting for this lock.
wait(timeout = nil) Link
Releases the lock held in the associated monitor and waits; reacquires the lock on wakeup.
If timeout
is given, this method returns after timeout
seconds passed, even if no other thread doesn’t signal.
wait_until() Link
Calls wait repeatedly until the given block yields a truthy value.