Queue.PriorityQueue
¶
-
class
Queue.
PriorityQueue
(maxsize=0)[source]¶ Variant of Queue that retrieves open entries in priority order (lowest first).
Entries are typically tuples of the form: (priority number, data).
Methods¶
__init__ ([maxsize]) |
|
_get ([heappop]) |
|
_init (maxsize) |
|
_put (item[, heappush]) |
|
_qsize ([len]) |
|
empty () |
Return True if the queue is empty, False otherwise (not reliable!). |
full () |
Return True if the queue is full, False otherwise (not reliable!). |
get ([block, timeout]) |
Remove and return an item from the queue. |
get_nowait () |
Remove and return an item from the queue without blocking. |
join () |
Blocks until all items in the Queue have been gotten and processed. |
put (item[, block, timeout]) |
Put an item into the queue. |
put_nowait (item) |
Put an item into the queue without blocking. |
qsize () |
Return the approximate size of the queue (not reliable!). |
task_done () |
Indicate that a formerly enqueued task is complete. |