]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #7707: Documented that multiprocessing.Queue operations during
authorAsk Solem <askh@opera.com>
Tue, 9 Nov 2010 21:46:03 +0000 (21:46 +0000)
committerAsk Solem <askh@opera.com>
Tue, 9 Nov 2010 21:46:03 +0000 (21:46 +0000)
import can lead to deadlocks.

Doc/library/multiprocessing.rst
Misc/NEWS

index 4f3f1cdb5c65e9e6265154f3d0317d4fcad3909f..d6112787005c146eb2b59ee7af3acf8503f1ba1d 100644 (file)
@@ -120,7 +120,9 @@ processes:
           print(q.get())    # prints "[42, None, 'hello']"
           p.join()
 
-   Queues are thread and process safe.
+   Queues are thread and process safe, but note that they must never
+   be instantiated as a side effect of importing a module: this can lead
+   to a deadlock!  (see :ref:`threaded-imports`)
 
 **Pipes**
 
index 3e0de21c36af729d23decc887977219dbab9431a..365b9cb99443ef7a7cfecc4292fdda9299cc3aa4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -2879,6 +2879,9 @@ Build
 Documentation
 -------------
 
+- Issue #7707: Document that ``multiprocessing.Queue`` operations during import
+  can lead to deadlocks.
+
 - Issue #9817: Add expat COPYING file; add expat, libffi and expat licenses
   to Doc/license.rst.