7.5 Standard Module Queue

 

 

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 exception:

Empty
Exception raised when non-blocking get (e.g. get_nowait()) is called on a Queue object which is empty, or for which the emptyiness cannot be determined (i.e. because the appropriate locks cannot be acquired).





guido@python.org