From f02009f77bda8c6735fcb753525df247318bef2f Mon Sep 17 00:00:00 2001 From: nightcityblade Date: Fri, 9 Oct 2026 23:14:31 +0800 Subject: [PATCH] gh-159011: Update dummy thread lifecycle documentation --- Doc/library/threading.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index 5d9a7b6314b1668..c27616ceaf53286 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -505,8 +505,12 @@ There is the possibility that "dummy thread objects" are created. These are thread objects corresponding to "alien threads", which are threads of control started outside the threading module, such as directly from C code. Dummy thread objects have limited functionality; they are always considered alive and -daemonic, and cannot be :ref:`joined `. They are never deleted, -since it is impossible to detect the termination of alien threads. +daemonic, and cannot be :ref:`joined `. They are removed from +the list of active threads when their alien threads terminate. + +.. versionchanged:: 3.13 + Dummy thread objects are now removed from the list of active threads when + their alien threads terminate. .. class:: Thread(group=None, target=None, name=None, args=(), kwargs={}, *, \