We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eae8100 commit 9fc6279Copy full SHA for 9fc6279
1 file changed
Doc/library/threading.rst
@@ -247,6 +247,12 @@ that the entire Python program exits when only daemon threads are left. The
247
initial value is inherited from the creating thread. The flag can be set
248
through the :attr:`daemon` property.
249
250
+.. note::
251
+ Daemon threads are abruptly stopped at shutdown. Their resources (such
252
+ as open files, database transactions, etc.) may not be released properly.
253
+ If you want your threads to stop gracefully, make them non-daemonic and
254
+ use a suitable signalling mechanism such as an :class:`Event`.
255
+
256
There is a "main thread" object; this corresponds to the initial thread of
257
control in the Python program. It is not a daemon thread.
258
0 commit comments