class Concurrent::BlockingRingBuffer
def take
-
(Object)
- the first available value and removes it from the buffer. If buffer is empty it blocks until an element is available
def take @mutex.synchronize do wait_while_empty result = @buffer.poll @condition.signal result end end