Skip to content

Commit a6b61fb

Browse files
committed
Add quote links to 'Daemon Threads Are Not the Problem'
1 parent 095f943 commit a6b61fb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

peps/pep-0788.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ Prior to this PEP, deprecating daemon threads was discussed
181181
`extensively <https://discuss.python.org/t/68836>`_. Daemon threads technically
182182
cause many of the issues outlined in this proposal, so removing daemon threads
183183
could be seen as a potential solution. The main argument for removing daemon
184-
threads is that they're a large cause of problems in the interpreter:
184+
threads is that they're a large cause of problems in the interpreter
185+
`[1] <https://discuss.python.org/t/68836/6>`_.
185186

186187
Except that daemon threads don’t actually work reliably. They’re attempting
187188
to run and use Python interpreter resources after the runtime has been shut
@@ -190,7 +191,8 @@ threads is that they're a large cause of problems in the interpreter:
190191

191192
However, in practice, daemon threads are useful for simplifying many threading
192193
applications in Python, and since the program is about to close in most cases,
193-
it's not worth the added complexity to try and gracefully shut down a thread.
194+
it's not worth the added complexity to try and gracefully shut down a thread
195+
`[2] <https://discuss.python.org/t/68836/3>`_.
194196

195197
When I’ve needed daemon threads, it’s usually been the case of “Long-running,
196198
uninterruptible, third-party task” in terms of the examples in the linked issue.
@@ -205,7 +207,8 @@ As noted by this PEP, extension modules are free to create their own threads
205207
and attach thread states for them. Similar to daemon threads, Python doesn't
206208
try and join them during finalization, so trying to remove daemon threads
207209
as a whole would involve trying to remove them from the C API, which would
208-
require a much more massive API change.
210+
require a much more massive API change than what is currently being proposed
211+
`[3] <https://discuss.python.org/t/68836/7>`_.
209212

210213
Realize however that even if we get rid of daemon threads, extension
211214
module code can and does spawn its own threads that are not tracked by

0 commit comments

Comments
 (0)