File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -274,8 +274,10 @@ If the :meth:`~Thread.run` method raises an exception,
274274:func: `threading.excepthook ` is called to handle it. By default,
275275:func: `threading.excepthook ` ignores silently :exc: `SystemExit `.
276276
277- A thread can be flagged as a "daemon thread". The significance of this flag is
278- that the entire Python program exits when only daemon threads are left. The
277+ A thread can be flagged as a "daemon thread". A thread with this flag is shut
278+ down when the main thread and all others non-daemon threads end.
279+ This means a Python program runs as long as non-daemon threads (such as the main
280+ thread) are running, and exits when only daemon threads are left. The
279281initial value is inherited from the creating thread. The flag can be set
280282through the :attr: `~Thread.daemon ` property or the *daemon * constructor
281283argument.
You can’t perform that action at this time.
0 commit comments