[Python-checkins] cpython (merge 3.3 -> default): Issue #18277: Merge.

richard.oudkerk python-checkins at python.org
Mon Jun 24 15:53:30 CEST 2013


http://hg.python.org/cpython/rev/06b1447becdc
changeset:   84309:06b1447becdc
parent:      84306:6915dfddb3f6
parent:      84308:0f921e73433a
user:        Richard Oudkerk <shibturn at gmail.com>
date:        Mon Jun 24 14:52:14 2013 +0100
summary:
  Issue #18277: Merge.

files:
  Doc/library/multiprocessing.rst |  17 +++++++++++++++++
  1 files changed, 17 insertions(+), 0 deletions(-)


diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -515,6 +515,23 @@
    the :mod:`multiprocessing` namespace so you need to import them from
    :mod:`queue`.
 
+.. note::
+
+   When an object is put on a queue, the object is pickled and a
+   background thread later flushes the pickled data to an underlying
+   pipe.  This has some consequences which are a little surprising,
+   but should not cause any pratical difficulties -- you can always
+   use a managed queue if they really bother you.
+
+   (1) After putting an object on an empty queue there may be an
+       infinitessimal delay before the queue's :meth:`~Queue.empty`
+       method returns :const:`False` and :meth:`~Queue.get_nowait` can
+       return without raising :exc:`Queue.Empty`.
+
+   (2) If multiple processes are enqueuing objects, it is possible for
+       the objects to be received at the other end out-of-order.
+       However, objects enqueued by the same process will always be in
+       the expected order with respect to each other.
 
 .. warning::
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list