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.
# File ext/monitor/lib/monitor.rb, line 106 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.
Ruby Core © 1993–2020 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.