Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d786ac7

Browse files
authoredJan 14, 2025
gh-59705: Document OS thread name change (#128800)
1 parent 43ef958 commit d786ac7

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed
 

‎Doc/library/threading.rst

+7-3
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,13 @@ since it is impossible to detect the termination of alien threads.
380380
This method will raise a :exc:`RuntimeError` if called more than once
381381
on the same thread object.
382382

383+
If supported, set the operating system thread name to
384+
:attr:`threading.Thread.name`. The name can be truncated depending on the
385+
operating system thread name limits.
386+
387+
.. versionchanged:: 3.14
388+
Set the operating system thread name.
389+
383390
.. method:: run()
384391

385392
Method representing the thread's activity.
@@ -443,9 +450,6 @@ since it is impossible to detect the termination of alien threads.
443450
running thread is renamed. (Setting the *name* attribute of a
444451
different thread only updates the Python Thread object.)
445452

446-
.. versionchanged:: 3.14
447-
Set the operating system thread name.
448-
449453
.. method:: getName()
450454
setName()
451455

‎Doc/whatsnew/3.14.rst

+7
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,13 @@ sys.monitoring
645645
* Two new events are added: :monitoring-event:`BRANCH_LEFT` and
646646
:monitoring-event:`BRANCH_RIGHT`. The ``BRANCH`` event is deprecated.
647647

648+
threading
649+
---------
650+
651+
* :meth:`threading.Thread.start` now sets the operating system thread name
652+
to :attr:`threading.Thread.name`.
653+
(Contributed by Victor Stinner in :gh:`59705`.)
654+
648655
tkinter
649656
-------
650657

0 commit comments

Comments
 (0)
Failed to load comments.