Method: Mongo::ConditionVariable#wait
- Defined in:
- lib/mongo/condition_variable.rb
#wait(timeout = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Waits for the condition variable to be signaled up to timeout seconds. If condition variable is not signaled, returns after timeout seconds.
32 33 34 35 36 |
# File 'lib/mongo/condition_variable.rb', line 32 def wait(timeout = nil) raise_unless_locked! return false if timeout && timeout < 0 @cv.wait(@lock, timeout) end |