Improve threading.daemon docstring (GH-14278)

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 bb110cc2ed)

Co-authored-by: mbarkhau <mbarkhau@gmail.com>
This commit is contained in:
Miss Islington (bot) 2019-06-23 12:08:28 -07:00 committed by GitHub
parent adcdb1e4f5
commit 0346448396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1005,8 +1005,7 @@ class Thread(_Verbose):
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"