Skip to content

Commit 52180bf

Browse files
miss-islingtonaisk
andauthored
[3.13] gh-109070: Document that get_context in multiprocessing have side effect (GH-136341) (GH-136344)
gh-109070: Document that get_context in multiprocessing have side effect (GH-136341) Document that get_context in multiprocessing have side effect (cherry picked from commit 77a8bd2) Co-authored-by: AN Long <[email protected]>
1 parent e7a2d2a commit 52180bf

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Doc/library/multiprocessing.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,9 @@ Miscellaneous
10791079
Return a context object which has the same attributes as the
10801080
:mod:`multiprocessing` module.
10811081

1082-
If *method* is ``None`` then the default context is returned.
1082+
If *method* is ``None`` then the default context is returned. Note that if
1083+
the global start method has not been set, this will set it to the
1084+
default method.
10831085
Otherwise *method* should be ``'fork'``, ``'spawn'``,
10841086
``'forkserver'``. :exc:`ValueError` is raised if the specified
10851087
start method is not available. See :ref:`multiprocessing-start-methods`.
@@ -1090,10 +1092,10 @@ Miscellaneous
10901092

10911093
Return the name of start method used for starting processes.
10921094

1093-
If the start method has not been fixed and *allow_none* is false,
1094-
then the start method is fixed to the default and the name is
1095-
returned. If the start method has not been fixed and *allow_none*
1096-
is true then ``None`` is returned.
1095+
If the global start method has not been set and *allow_none* is
1096+
``False``, then the start method is set to the default and the name
1097+
is returned. If the start method has not been set and *allow_none* is
1098+
``True`` then ``None`` is returned.
10971099

10981100
The return value can be ``'fork'``, ``'spawn'``, ``'forkserver'``
10991101
or ``None``. See :ref:`multiprocessing-start-methods`.

0 commit comments

Comments
 (0)