summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-09-23 21:21:19 (GMT)
committerGitHub <noreply@github.com>2020-09-23 21:21:19 (GMT)
commit98c16c991d6e70a48f4280a7cd464d807bdd9f2b (patch)
treefce606ea267df285b5c1149fea97340389701b8b /Doc
parent2e4dd336e5b50fd30947fdecb605ddcd71f7f6f5 (diff)
downloadcpython-98c16c991d6e70a48f4280a7cd464d807bdd9f2b.zip
cpython-98c16c991d6e70a48f4280a7cd464d807bdd9f2b.tar.gz
cpython-98c16c991d6e70a48f4280a7cd464d807bdd9f2b.tar.bz2
bpo-41833: threading.Thread now uses the target name (GH-22357)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/threading.rst9
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index 7fcf93d..7eb12fe 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -264,8 +264,10 @@ since it is impossible to detect the termination of alien threads.
*target* is the callable object to be invoked by the :meth:`run` method.
Defaults to ``None``, meaning nothing is called.
- *name* is the thread name. By default, a unique name is constructed of the
- form "Thread-*N*" where *N* is a small decimal number.
+ *name* is the thread name. By default, a unique name is constructed
+ of the form "Thread-*N*" where *N* is a small decimal number,
+ or "Thread-*N* (target)" where "target" is ``target.__name__`` if the
+ *target* argument is specified.
*args* is the argument tuple for the target invocation. Defaults to ``()``.
@@ -280,6 +282,9 @@ since it is impossible to detect the termination of alien threads.
base class constructor (``Thread.__init__()``) before doing anything else to
the thread.
+ .. versionchanged:: 3.10
+ Use the *target* name if *name* argument is omitted.
+
.. versionchanged:: 3.3
Added the *daemon* argument.