Method: Queue#pop
- Defined in:
- thread.c
#pop(non_block = false) ⇒ Object #deq(non_block = false) ⇒ Object #shift(non_block = false) ⇒ Object Also known as: deq, shift
Retrieves data from the queue.
If the queue is empty, the calling thread is suspended until data is pushed onto the queue. If non_block
is true, the thread isn’t suspended, and an exception is raised.
312 313 314 315 316 317 |
# File 'thread.c', line 312
static VALUE
rb_queue_pop(int argc, VALUE *argv, VALUE self)
{
VALUE should_block = queue_pop_should_block(argc, argv);
return queue_do_pop(self, should_block);
}
|