Method: XThread::RBSizedQueue#pop
- Defined in:
- lib/xthread.rb
#pop(*args) ⇒ Object Also known as: shift, deq
Retrieves data from the queue and runs a waiting thread, if any.
222 223 224 225 226 227 228 229 230 |
# File 'lib/xthread.rb', line 222 def pop(*args) retval = super @mutex.synchronize { if @que.length < @max @cond_wait.signal end } retval end |