[issue42730] TypeError/hang inside of Time.Sleep() when _thread.interrupt_main()
Eryk Sun
report at bugs.python.org
Wed Mar 17 17:45:01 EDT 2021
Eryk Sun <eryksun at gmail.com> added the comment:
> Shouldn't the behaviour for _thread.interrupt_main() be always to
> interrupt the main thread.
The underlying C API function, PyErr_SetInterrupt(), simulates SIGINT without actually sending the signal to the process via kill() or raise(), but the doc string of interrupt_main() doesn't explain this, or at least it didn't used to. bpo-43356 generalized _thread.interrupt_main() to support simulating any available signal, and hopefully the new doc string [1] clarifies the intent.
---
[1] https://github.com/python/cpython/blob/9976834f807ea63ca51bc4f89be457d734148682/Modules/_threadmodule.c#L1194
----------
stage: -> resolved
status: open -> closed
superseder: -> _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42730>
_______________________________________
More information about the Python-bugs-list
mailing list