You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_thread module docs: remove/update certain bullet points in the *caveats* list #125025
Near the end of the documentation of the _thread module there is a list of caveats. It looks like it was written a long time ago and some of its items seem no longer accurate...
We can read that:
[in the first bullet point]
Threads interact strangely with interrupts: the KeyboardInterrupt exception will be received by an arbitrary thread. (When the signal module is available, interrupts always go to the main thread.)
whereas it seems that nowadays we could replace that text with a much simpler statement:
Interrupts always go to the main thread (the KeyboardInterrupt exception will be received by that thread).
[in the last bullet point]
When the main thread exits, it does not do any of its usual cleanup (except that try … finally clauses are honored), and the standard I/O files are not flushed.
whereas it seems just not true anymore. I believe this bullet point should be removed entirely.
Here, I address a request to a core developer who is an expert in threading to confirm or correct my change suggestions presented above. [EDIT: see the related PR]
Activity
pythongh-125025: `_thread` docs: fix/update the *caveats* list
gh-125025: `_thread` docs: fix/update the *caveats* list (GH-125026)
pythongh-125025: `_thread` docs: fix/update the *caveats* list (pytho…
pythongh-125025: `_thread` docs: fix/update the *caveats* list (pytho…
gpshead commentedon Oct 6, 2024
Thanks! merged & doc backports are on their way.
[3.12] gh-125025: `_thread` docs: fix/update the *caveats* list (GH-1…
[3.13] gh-125025: `_thread` docs: fix/update the *caveats* list (GH-1…