class Concurrent::JavaCountDownLatch
def wait(timeout = nil)
def wait(timeout = nil) result = nil if timeout.nil? Synchronization::JRuby.sleep_interruptibly { @latch.await } result = true else Synchronization::JRuby.sleep_interruptibly do result = @latch.await(1000 * timeout, java.util.concurrent.TimeUnit::MILLISECONDS) end end result end