Ruby Queue Functions
EditRocket provides the following information on Queue functions in the Ruby source code builder.
clear() - Removes all objects from the queue.
deq(non_block=false) - "Alias for #pop"
empty?() - Returns true is the queue is empty.
enq(obj) - "Alias for #push"
length() - Returns the length of the queue.
new() - Creates a new queue.
num_waiting() - Returns the number of threads waiting on the queue.
pop(non_block=false) - 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.
push(obj) - Pushes obj to the queue.
shift(non_block=false) - "Alias for #pop"
size() - "Alias for #length"