instance method
MonitorMixin::ConditionVariable#wait
(?::Numeric? timeout) -> untyped
wait(timeout = nil)
ext/monitor/lib/monitor.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/ext/monitor/lib/monitor.rb, line 105
def wait(timeout = nil)
@monitor.mon_check_owner
@monitor.wait_for_cond(@cond, timeout)
end
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.