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.
# File monitor.rb, line 121 def broadcast @monitor.__send__(:mon_check_owner) @cond.broadcast end
# File monitor.rb, line 126 def count_waiters raise NotImplementedError end
# File monitor.rb, line 116 def signal @monitor.__send__(:mon_check_owner) @cond.signal end
# File monitor.rb, line 90 def wait(timeout = nil) if timeout raise NotImplementedError, "timeout is not implemented yet" end @monitor.__send__(:mon_check_owner) count = @monitor.__send__(:mon_exit_for_cond) begin @cond.wait(@monitor.instance_variable_get("@mon_mutex")) return true ensure @monitor.__send__(:mon_enter_for_cond, count) end end