Methods
Public Instance methods
timed_wait(mutex, secs)

This is like ConditionVariable.wait(), but allows one to wait a maximum amount of time. Returns true if this condition was signaled, false if a timeout occurred.

     # File lib/passenger/utils.rb, line 291
291:         def timed_wait(mutex, secs)
292:                 require 'timeout' unless defined?(Timeout)
293:                 if secs > 0
294:                         Timeout.timeout(secs) do
295:                                 wait(mutex)
296:                         end
297:                 else
298:                         wait(mutex)
299:                 end
300:                 return true
301:         rescue Timeout::Error
302:                 return false
303:         end
timed_wait!(mutex, secs)

This is like ConditionVariable.wait(), but allows one to wait a maximum amount of time. Raises Timeout::Error if the timeout has elapsed.

     # File lib/passenger/utils.rb, line 307
307:         def timed_wait!(mutex, secs)
308:                 require 'timeout' unless defined?(Timeout)
309:                 if secs > 0
310:                         Timeout.timeout(secs) do
311:                                 wait(mutex)
312:                         end
313:                 else
314:                         wait(mutex)
315:                 end
316:         end