]> granicus.if.org Git - python/commitdiff
Improve threading.daemon docstring (GH-14278)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 23 Jun 2019 19:06:21 +0000 (12:06 -0700)
committerGitHub <noreply@github.com>
Sun, 23 Jun 2019 19:06:21 +0000 (12:06 -0700)
Rephrase and clarify that "the entire Python program exits when only daemon threads are left". This matches the documentation at https://docs.python.org/3/library/threading.htmlGH-thread-objects.
(cherry picked from commit bb110cc2ed81447fb48805f31146cf31323a8fc3)

Co-authored-by: mbarkhau <mbarkhau@gmail.com>
Lib/threading.py

index 7c6d404bcd10f6085ef285f28c929faf25846686..2f6ac7036f5f62ca357164aefa51ab2e2ba430c2 100644 (file)
@@ -1101,8 +1101,7 @@ class Thread:
         main thread is not a daemon thread and therefore all threads created in
         the main thread default to daemon = False.
 
-        The entire Python program exits when no alive non-daemon threads are
-        left.
+        The entire Python program exits when only daemon threads are left.
 
         """
         assert self._initialized, "Thread.__init__() not called"