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.html#thread-objects.
This commit is contained in:
mbarkhau 2019-06-22 14:51:06 +02:00 committed by Miss Islington (bot)
parent 186f70905d
commit bb110cc2ed
1 changed files with 1 additions and 2 deletions

View File

@ -1107,8 +1107,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"