@@ -173,14 +173,14 @@ cause many of the issues outlined in this proposal, so removing daemon threads
173173could be seen as a potential solution. The main argument for removing daemon
174174threads is that they're a large cause of problems in the interpreter:
175175
176- Except that daemon threads don’t actually work reliably. They’re attempting
176+ Except that daemon threads don’t actually work reliably. They’re attempting
177177 to run and use Python interpreter resources after the runtime has been shut
178178 down upon runtime finalization. As in they have pointers to global state for
179179 the interpreter.
180180
181181In practice, daemon threads are useful for simplifying many threading applications
182182in Python, and since the program is about to close in most cases, it's not worth
183- the added complexity to try and gracefully shut down a thread.
183+ the added complexity to try and gracefully shut down a thread.
184184
185185 When I’ve needed daemon threads, it’s usually been the case of “Long-running,
186186 uninterruptible, third-party task” in terms of the examples in the linked issue.
@@ -206,15 +206,15 @@ Joining the Thread isn't Always a Good Idea
206206*******************************************
207207
208208Even in daemon threads, it's generally *possible * to prevent hanging of
209- native threads through :mod: `atexit ` functions.
209+ native threads through :mod: `atexit ` functions.
210210A thread could be started by some C function, and then as long as
211211that thread is joined by :mod: `atexit `, then the thread won't hang.
212212
213213:mod: `atexit ` isn't always an option for a function, because to call it, it
214214needs to already have an :term: `attached thread state ` for the thread. If
215215there's no guarantee of that, then :func: `atexit.register ` cannot be safely
216216called without the risk of hanging the thread. This shifts the contract
217- of joining the thread to the caller rather than the callee, which again,
217+ of joining the thread to the caller rather than the callee, which again,
218218isn't done in practice.
219219
220220For example, large C++ applications might want to expose an interface that can
@@ -359,7 +359,7 @@ Preventing Interpreter Shutdown with Reference Counting
359359-------------------------------------------------------
360360
361361This PEP takes an approach where an interpreter is given a reference count
362- that prevents it from shutting down. So, holding a "strong reference" to the
362+ that prevents it from shutting down. So, holding a "strong reference" to the
363363interpreter will make it safe to call the C API without worrying about the
364364thread being hung.
365365
0 commit comments