ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH

Reference
ActivePython 2.5
Python Documentation
Library Reference
5. Data Types
5.1 datetime -- Basic date and time types
5.2 calendar -- General calendar-related functions
5.3 collections -- High-performance container datatypes
5.4 heapq -- Heap queue algorithm
5.5 bisect -- Array bisection algorithm
5.6 array -- Efficient arrays of numeric values
5.7 sets -- Unordered collections of unique elements
5.8 sched -- Event scheduler
5.9 mutex -- Mutual exclusion support
5.10 Queue -- A synchronized queue class
5.10.1 Queue Objects
5.11 weakref -- Weak references
5.12 UserDict -- Class wrapper for dictionary objects
5.13 UserList -- Class wrapper for list objects
5.14 UserString -- Class wrapper for string objects
5.15 types -- Names for built-in types
5.16 new -- Creation of runtime internal objects
5.17 copy -- Shallow and deep copy operations
5.18 pprint -- Data pretty printer
5.19 repr -- Alternate repr() implementation

MyASPN >> Reference >> ActivePython 2.5 >> Python Documentation >> Library Reference >> 5. Data Types
ActivePython 2.5 documentation

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

class 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.

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

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



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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved