diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/threading.rst | 9 |
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. |