cpython: 8dcc4e017d42 (original) (raw)
Mercurial > cpython
changeset 84307:8dcc4e017d42 2.7
Issue #18277: Document quirks of multiprocessing queue. [#18277]
Richard Oudkerk shibturn@gmail.com | |
---|---|
date | Mon, 24 Jun 2013 14:45:24 +0100 |
parents | a7db9f505e88 |
children | f50bbae95bc8 |
files | Doc/library/multiprocessing.rst |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-)[+] [-] Doc/library/multiprocessing.rst 17 |
line wrap: on
line diff
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -486,6 +486,23 @@ Note that one can also create a shared q
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`[](#l1.16)
method returns :const:`False` and :meth:`~Queue.get_nowait` can[](#l1.17)
return without raising :exc:`Queue.Empty`.[](#l1.18)