Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/queue.rst

    r2 r391  
    1 :mod:`queue` --- A synchronized queue class
     1:mod:`Queue` --- A synchronized queue class
    22===========================================
    33
     
    66
    77.. note::
    8    The :mod:`Queue` module has been renamed to :mod:`queue` in Python 3.0.  The
     8   The :mod:`Queue` module has been renamed to :mod:`queue` in Python 3.  The
    99   :term:`2to3` tool will automatically adapt imports when converting your
    10    sources to 3.0.
     10   sources to Python 3.
    1111
     12**Source code:** :source:`Lib/Queue.py`
     13
     14--------------
    1215
    1316The :mod:`Queue` module implements multi-producer, multi-consumer queues.
     
    1821module.
    1922
    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 are
     23The module implements three types of queue, which differ only in the order in
     24which the entries are retrieved.  In a FIFO queue, the first tasks added are
    2225the first retrieved. In a LIFO queue, the most recently added entry is
    2326the first retrieved (operating like a stack).  With a priority queue,
     
    2730The :mod:`Queue` module defines the following classes and exceptions:
    2831
    29 .. class:: Queue(maxsize)
     32.. class:: Queue(maxsize=0)
    3033
    3134   Constructor for a FIFO queue.  *maxsize* is an integer that sets the upperbound
     
    3437   *maxsize* is less than or equal to zero, the queue size is infinite.
    3538
    36 .. class:: LifoQueue(maxsize)
     39.. class:: LifoQueue(maxsize=0)
    3740
    3841   Constructor for a LIFO queue.  *maxsize* is an integer that sets the upperbound
     
    4346   .. versionadded:: 2.6
    4447
    45 .. class:: PriorityQueue(maxsize)
     48.. class:: PriorityQueue(maxsize=0)
    4649
    4750   Constructor for a priority queue.  *maxsize* is an integer that sets the upperbound
     
    5861.. exception:: Empty
    5962
    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
    6165   on a :class:`Queue` object which is empty.
    6266
     
    6468.. exception:: Full
    6569
    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
    6772   on a :class:`Queue` object which is full.
    6873
     
    184189   for i in range(num_worker_threads):
    185190        t = Thread(target=worker)
    186         t.setDaemon(True)
     191        t.daemon = True
    187192        t.start()
    188193
Note: See TracChangeset for help on using the changeset viewer.