diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2013-06-24 13:52:14 (GMT) |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2013-06-24 13:52:14 (GMT) |
commit | 35d05537fc260d73ec82b5587773f1b0f3d429b7 (patch) | |
tree | 93270c7606678e6da9789724562d41009fb14559 /Doc | |
parent | b3cc7eb74aff370848864fc864eefd94d2b4fb78 (diff) | |
parent | 95fe1a793fd82e4df4ac33939dfc8d7028b5b870 (diff) | |
download | cpython-35d05537fc260d73ec82b5587773f1b0f3d429b7.zip cpython-35d05537fc260d73ec82b5587773f1b0f3d429b7.tar.gz cpython-35d05537fc260d73ec82b5587773f1b0f3d429b7.tar.bz2 |
Issue #18277: Merge.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/multiprocessing.rst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 2562e30..e9fdfd2 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -515,6 +515,23 @@ Note that one can also create a shared queue by using a manager object -- see 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:: |