mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
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:
parent
175b2e9745
commit
ea380f6946
1 changed files with 1 additions and 2 deletions
|
@ -1101,8 +1101,7 @@ class Thread:
|
||||||
main thread is not a daemon thread and therefore all threads created in
|
main thread is not a daemon thread and therefore all threads created in
|
||||||
the main thread default to daemon = False.
|
the main thread default to daemon = False.
|
||||||
|
|
||||||
The entire Python program exits when no alive non-daemon threads are
|
The entire Python program exits when only daemon threads are left.
|
||||||
left.
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
assert self._initialized, "Thread.__init__() not called"
|
assert self._initialized, "Thread.__init__() not called"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue