Class: MonitorMixin::ConditionVariable
- Inherits:
-
Object
- Object
- MonitorMixin::ConditionVariable
- Defined in:
- lib/god/compat19.rb
Instance Method Summary collapse
Instance Method Details
#wait(timeout = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/god/compat19.rb', line 7 def wait(timeout = nil) @monitor.__send__(:mon_check_owner) count = @monitor.__send__(:mon_exit_for_cond) begin @cond.wait(@monitor.instance_variable_get("@mon_mutex"), timeout) return true ensure @monitor.__send__(:mon_enter_for_cond, count) end end |