summaryrefslogtreecommitdiffstats
path: root/Doc/library/multiprocessing.rst
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-09-24 11:53:56 (GMT)
committerGitHub <noreply@github.com>2023-09-24 11:53:56 (GMT)
commit62df559448362f9a4291661d64aee30474dec025 (patch)
treedadb3b6464d38c4d77665aaad6c3d9f04f09d3b4 /Doc/library/multiprocessing.rst
parent46207624b766996b141d9937f203727dca09f5d6 (diff)
downloadcpython-62df559448362f9a4291661d64aee30474dec025.zip
cpython-62df559448362f9a4291661d64aee30474dec025.tar.gz
cpython-62df559448362f9a4291661d64aee30474dec025.tar.bz2
[3.12] gh-100228: Document the os.fork threads DeprecationWarning. (GH-109767) (#109773)
* gh-100228: Document the os.fork threads DeprecationWarning. (GH-109767) Document the `os.fork` posix threads detected `DeprecationWarning` in 3.12 What's New, os, multiprocessing, and concurrent.futures docs. Many reviews and doc cleanup edits by Adam & Hugo. 🥳 (cherry picked from commit 5e7ea95d9d5c3b80a67ffbeebd76ce4fc327dd8e) Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> * link to the discussion thread from whatsnew Include the link to the discussion in the what's new text per @malemberg's comment on. https://github.com/python/cpython/pull/109767 (i'll follow up with a PR to main to include this edit there as well) --------- Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Diffstat (limited to 'Doc/library/multiprocessing.rst')
-rw-r--r--Doc/library/multiprocessing.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 38d24a8..2f0f1f8 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -131,6 +131,12 @@ to start a process. These *start methods* are
Code that requires *fork* should explicitly specify that via
:func:`get_context` or :func:`set_start_method`.
+ .. versionchanged:: 3.12
+ If Python is able to detect that your process has multiple threads, the
+ :func:`os.fork` function that this start method calls internally will
+ raise a :exc:`DeprecationWarning`. Use a different start method.
+ See the :func:`os.fork` documentation for further explanation.
+
*forkserver*
When the program starts and selects the *forkserver* start method,
a server process is spawned. From then on, whenever a new process