summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-12-20 22:23:57 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-12-20 22:23:57 (GMT)
commitac186221267a1e63de017fa96d61e181632a3a60 (patch)
treeb310200662c136a52167e7822350f0f92dfeb3cc /Doc
parent748bad2cd01f107f2efdc8352915e7cee57b6077 (diff)
downloadcpython-ac186221267a1e63de017fa96d61e181632a3a60.zip
cpython-ac186221267a1e63de017fa96d61e181632a3a60.tar.gz
cpython-ac186221267a1e63de017fa96d61e181632a3a60.tar.bz2
Add links to discussion of multiprocessing spawn/forkserver feature.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/multiprocessing.rst4
-rw-r--r--Doc/whatsnew/3.4.rst19
2 files changed, 14 insertions, 9 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 2c44dc9..a8872e7 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -101,6 +101,8 @@ necessary, see :ref:`multiprocessing-programming`.
Contexts and start methods
~~~~~~~~~~~~~~~~~~~~~~~~~~
+.. _multiprocessing-start-methods:
+
Depending on the platform, :mod:`multiprocessing` supports three ways
to start a process. These *start methods* are
@@ -147,7 +149,7 @@ there may some "leaked" semaphores. (Unlinking the named semaphores
is a serious matter since the system allows only a limited number, and
they will not be automatically unlinked until the next reboot.)
-To select the a start method you use the :func:`set_start_method` in
+To select a start method you use the :func:`set_start_method` in
the ``if __name__ == '__main__'`` clause of the main module. For
example::
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index 8132560..7550b35 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -114,8 +114,8 @@ Significantly Improved Library Modules:
* New :mod:`pickle` :ref:`protocol 4 <whatsnew-protocol-4>` (:pep:`3154`)
* :ref:`SHA-3 (Keccak) support <whatsnew-sha3>` for :mod:`hashlib`.
* :ref:`TLSv1.1 and TLSv1.2 support <whatsnew-tls-11-12>` for :mod:`ssl`.
-* :mod:`multiprocessing` now has option to avoid using :func:`os.fork`
- on Unix (:issue:`8713`).
+* :mod:`multiprocessing` now has :ref:`an option to avoid using os.fork
+ on Unix <whatsnew-multiprocessing-no-fork>` (:issue:`8713`).
* :mod:`email` has a new submodule, :mod:`~email.contentmanager`, and
a new :mod:`~email.message.Message` subclass
(:class:`~email.contentmanager.EmailMessage`) that simplify MIME handling.
@@ -633,14 +633,17 @@ mmap objects can now be weakref'ed.
multiprocessing
---------------
-On Unix, two new *start methods* (``spawn`` and ``forkserver``) have been
-added for starting processes using :mod:`multiprocessing`. These make
-the mixing of processes with threads more robust, and the ``spawn``
-method matches the semantics that multiprocessing has always used on
-Windows. (Contributed by Richard Oudkerk in :issue:`8713`).
+.. _whatsnew-multiprocessing-no-fork:
+
+On Unix, two new :ref:`start methods <multiprocessing-start-methods>`
+(``spawn`` and ``forkserver``) have been added for starting processes using
+:mod:`multiprocessing`. These make the mixing of processes with threads more
+robust, and the ``spawn`` method matches the semantics that multiprocessing has
+always used on Windows. (Contributed by Richard Oudkerk in :issue:`8713`).
Also, except when using the old *fork* start method, child processes
-will no longer inherit unneeded handles/file descriptors from their parents.
+will no longer inherit unneeded handles/file descriptors from their parents
+(part of :issue:`8713`).
:mod:`multiprocessing` now relies on :mod:`runpy` (which implements the
``-m`` switch) to initialise ``__main__`` appropriately in child processes