Class SizedQueue
In: ext/fastthread/fastthread.c
Parent: Queue

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

clear   empty?   length   max   max=   new   num_waiting   pop   push  

Public Class methods

Public Instance methods

Removes all objects from the queue.

Returns true if the queue is empty.

Returns the length of the queue.

Returns the maximum size of the queue.

Sets the maximum size of the queue.

Returns the number of threads waiting on the queue.

call_seq: 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.

Pushes obj to the queue.

[Validate]