- Inheritance
- < Object
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.
Classes & Modules
Methods
Class
Visibility | Signature |
---|---|
public | new (monitor) |
Instance
Visibility | Signature |
---|---|
public | broadcast () |
public | count_waiters () |
public | signal () |
public | wait (timeout = nil) |
public | wait_until () |
public | wait_while () |
Class Method Detail
new(monitor)
Instance Method Detail
broadcast()
Wake up all the waiters.
count_waiters()
signal()
Wake up and run the next waiter
wait(timeout = nil)
Create a new timer with the argument timeout, and add the current thread to the list of waiters. Then the thread is stopped. It will be resumed when a corresponding signal occurs.
wait_until()
call wait until the supplied block returns true.
wait_while()
call wait while the supplied block returns true.