Class Methods

Creates a fixed-length queue with a maximum size of max.

Instance Methods
An alias for push

Removes all objects from the queue.

Similar to Queue#close.

The difference is behavior with waiting enqueuing threads.

If there are waiting enqueuing threads, they are interrupted by raising ClosedQueueError(‘queue closed’).

An alias for pop

Returns the maximum size of the queue.

Sets the maximum size of the queue to the given number.

Returns the number of threads waiting on the queue.

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.

Pushes object to the queue.

If there is no space left in the queue, waits until space becomes available, unless non_block is true. If non_block is true, the thread isn’t suspended, and an exception is raised.

An alias for pop