Method: MonitorMixin::ConditionVariable#wait
- Defined in:
- lib/monitor.rb
#wait(timeout = nil) ⇒ Object
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.
106 107 108 109 |
# File 'lib/monitor.rb', line 106 def wait(timeout = nil) @monitor.mon_check_owner @monitor.wait_for_cond(@cond, timeout) end |