Home | Trees | Index | Help |
---|
Module Queue :: Class Queue |
|
TimeoutQueue
Method Summary | |
---|---|
Initialize a queue object with a given maximum size. | |
Return 1 if the queue is empty, 0 otherwise (not reliable!). | |
Return 1 if the queue is full, 0 otherwise (not reliable!). | |
Remove and return an item from the queue. | |
Remove and return an item from the queue without blocking. | |
Put an item into the queue. | |
Put an item into the queue without blocking. | |
Return the approximate size of the queue (not reliable!). | |
_empty(self)
| |
_full(self)
| |
_get(self)
| |
_init(self,
maxsize)
| |
_put(self,
item)
| |
_qsize(self)
|
Method Details |
---|
__init__(self,
maxsize=0)
|
empty(self)Return 1 if the queue is empty, 0 otherwise (not reliable!). |
full(self)Return 1 if the queue is full, 0 otherwise (not reliable!). |
get(self, block=1)Remove and return an item from the queue. If optional arg 'block' is 1 (the default), block if necessary until an item is available. Otherwise (block is 0), return an item if one is immediately available, else raise the Empty exception. |
get_nowait(self)Remove and return an item from the queue without blocking. Only get an item if one is immediately available. Otherwise raise the Empty exception. |
put(self, item, block=1)Put an item into the queue. If optional arg 'block' is 1 (the default), block if necessary until a free slot is available. Otherwise (block is 0), put an item on the queue if a free slot is immediately available, else raise the Full exception. |
put_nowait(self, item)Put an item into the queue without blocking. Only enqueue the item if a free slot is immediately available. Otherwise raise the Full exception. |
qsize(self)Return the approximate size of the queue (not reliable!). |
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Sat Feb 15 21:18:50 2003 | http://epydoc.sf.net |