Thanks to visit codestin.com Credit goes to github.com
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 10f8932 + db0b7be commit a7b8149Copy full SHA for a7b8149
1 file changed
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