module Queue





7.7 Queue -- A synchronized queue class

















Python Library Reference




Previous: 7.6.1 Mutex Objects
Up: 7. Optional Operating System
Next: 7.7.1 Queue Objects




7.7 Queue --
A synchronized queue class






The Queue module implements a multi-producer, multi-consumer
FIFO queue. It is especially useful in threads programming when
information must be exchanged safely between multiple threads. The
Queue class in this module implements all the required locking
semantics. It depends on the availability of thread support in
Python.


The Queue module defines the following class and exception:


Queue (maxsize)

Constructor for the class. maxsize is an integer that sets the
upperbound limit on the number of items that can be placed in the
queue. Insertion will block once this size has been reached, until
queue items are consumed. If maxsize is less than or equal to
zero, the queue size is infinite.



Empty

Exception raised when non-blocking get() (or
get_nowait()) is called on a Queue object which is
empty or locked.



Full

Exception raised when non-blocking put() (or
put_nowait()) is called on a Queue object which is
full or locked.






Subsections


7.7.1 Queue Objects








Python Library Reference




Previous: 7.6.1 Mutex Objects
Up: 7. Optional Operating System
Next: 7.7.1 Queue Objects



See About this document... for information on suggesting changes.





Wyszukiwarka

Podobne podstrony:
module al constants
function mcrypt module get algo key size
CISCO CCNA Certifications CCNA 2 Module 6
module zipfile
module files
module sunaudiodev
Module HOWTO pl (3)
module pprint
Book 5 module 3 test A
module cursesascii
module tabnanny
module fileinput
01 52 Check control module 01
module files
module thread

więcej podobnych podstron