[Python-checkins] cpython (2.7): Issue #17273: Clarify that pool methods can only be used by parent process.

richard.oudkerk python-checkins at python.org
Tue Jul 2 13:42:33 CEST 2013


http://hg.python.org/cpython/rev/389788ba6bcb
changeset:   84422:389788ba6bcb
branch:      2.7
parent:      84413:bc34fe4a0d58
user:        Richard Oudkerk <shibturn at gmail.com>
date:        Tue Jul 02 12:31:50 2013 +0100
summary:
  Issue #17273: Clarify that pool methods can only be used by parent process.

files:
  Doc/library/multiprocessing.rst |  6 ++++++
  1 files changed, 6 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
@@ -287,6 +287,9 @@
        print result.get(timeout=1)           # prints "100" unless your computer is *very* slow
        print pool.map(f, range(10))          # prints "[0, 1, 4,..., 81]"
 
+Note that the methods of a pool should only ever be used by the
+process which created it.
+
 
 Reference
 ---------
@@ -1599,6 +1602,9 @@
    *initializer* is not ``None`` then each worker process will call
    ``initializer(*initargs)`` when it starts.
 
+   Note that the methods of the pool object should only be called by
+   the process which created the pool.
+
    .. versionadded:: 2.7
       *maxtasksperchild* is the number of tasks a worker process can complete
       before it will exit and be replaced with a fresh worker process, to enable

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


More information about the Python-checkins mailing list