This class represents queues of specified size capacity. The push operation may be blocked if the capacity is full.
See Queue for an example of how a SizedQueue works.
Methods
Class Public methods
new(max)
Link
Creates a fixed-length queue with a maximum size of max.
Instance Public methods
clear()
Link
Removes all objects from the queue and wakes waiting threads, if any.
max()
Link
Returns the maximum size of the queue.
max=(max)
Link
Sets the maximum size of the queue.
num_waiting()
Link
Returns the number of threads waiting on the queue.
pop(*args)
Link
Retrieves data from the queue and runs a waiting thread, if any.
push(obj)
Link
Pushes obj to the queue. If there is no space left in the
queue, waits until space becomes available.