Changeset 391 for python/trunk/Doc/library/queue.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/queue.rst
r2 r391 1 :mod:` queue` --- A synchronized queue class1 :mod:`Queue` --- A synchronized queue class 2 2 =========================================== 3 3 … … 6 6 7 7 .. note:: 8 The :mod:`Queue` module has been renamed to :mod:`queue` in Python 3. 0.The8 The :mod:`Queue` module has been renamed to :mod:`queue` in Python 3. The 9 9 :term:`2to3` tool will automatically adapt imports when converting your 10 sources to 3.0.10 sources to Python 3. 11 11 12 **Source code:** :source:`Lib/Queue.py` 13 14 -------------- 12 15 13 16 The :mod:`Queue` module implements multi-producer, multi-consumer queues. … … 18 21 module. 19 22 20 Implements three types of queue whose only difference is the order that 21 the entries are retrieved. In a FIFO queue, the first tasks added are23 The module implements three types of queue, which differ only in the order in 24 which the entries are retrieved. In a FIFO queue, the first tasks added are 22 25 the first retrieved. In a LIFO queue, the most recently added entry is 23 26 the first retrieved (operating like a stack). With a priority queue, … … 27 30 The :mod:`Queue` module defines the following classes and exceptions: 28 31 29 .. class:: Queue(maxsize )32 .. class:: Queue(maxsize=0) 30 33 31 34 Constructor for a FIFO queue. *maxsize* is an integer that sets the upperbound … … 34 37 *maxsize* is less than or equal to zero, the queue size is infinite. 35 38 36 .. class:: LifoQueue(maxsize )39 .. class:: LifoQueue(maxsize=0) 37 40 38 41 Constructor for a LIFO queue. *maxsize* is an integer that sets the upperbound … … 43 46 .. versionadded:: 2.6 44 47 45 .. class:: PriorityQueue(maxsize )48 .. class:: PriorityQueue(maxsize=0) 46 49 47 50 Constructor for a priority queue. *maxsize* is an integer that sets the upperbound … … 58 61 .. exception:: Empty 59 62 60 Exception raised when non-blocking :meth:`get` (or :meth:`get_nowait`) is called 63 Exception raised when non-blocking :meth:`~Queue.get` (or 64 :meth:`~Queue.get_nowait`) is called 61 65 on a :class:`Queue` object which is empty. 62 66 … … 64 68 .. exception:: Full 65 69 66 Exception raised when non-blocking :meth:`put` (or :meth:`put_nowait`) is called 70 Exception raised when non-blocking :meth:`~Queue.put` (or 71 :meth:`~Queue.put_nowait`) is called 67 72 on a :class:`Queue` object which is full. 68 73 … … 184 189 for i in range(num_worker_threads): 185 190 t = Thread(target=worker) 186 t. setDaemon(True)191 t.daemon = True 187 192 t.start() 188 193
Note:
See TracChangeset
for help on using the changeset viewer.