Class: ConditionVariable
- Inherits:
-
Object
- Object
- ConditionVariable
- Defined in:
- lib/god/compat19.rb
Overview
Instance Method Summary collapse
Instance Method Details
#wait(mutex, timeout = nil) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/god/compat19.rb', line 26 def wait(mutex, timeout=nil) begin # TODO: mutex should not be used @waiters_mutex.synchronize do @waiters.push(Thread.current) end mutex.sleep timeout end self end |