Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Thread::Queue#deq

deq(non_block=false)

Alias of #pop

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 ThreadError is raised.

See also #pop #closed? #empty? #close also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2