We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 23e043f + 38b8254 commit db0b7beCopy full SHA for db0b7be
Doc/library/threading.rst
@@ -174,6 +174,12 @@ initial value is inherited from the creating thread. The flag can be set
174
through the :attr:`~Thread.daemon` property or the *daemon* constructor
175
argument.
176
177
+.. note::
178
+ Daemon threads are abruptly stopped at shutdown. Their resources (such
179
+ as open files, database transactions, etc.) may not be released properly.
180
+ If you want your threads to stop gracefully, make them non-daemonic and
181
+ use a suitable signalling mechanism such as an :class:`Event`.
182
+
183
There is a "main thread" object; this corresponds to the initial thread of
184
control in the Python program. It is not a daemon thread.
185
0 commit comments