[issue42296] Infinite loop uninterruptable on Windows in 3.10

Eryk Sun report at bugs.python.org
Fri Nov 13 09:08:17 EST 2020


Eryk Sun <eryksun at gmail.com> added the comment:

> always interrupt and let the thread decide if it has something to do.

SIGNAL_PENDING_CALLS() is called on a Python thread via signal.raise_signal() or _thread.interrupt_main() / PyErr_SetInterrupt(). If you'd rather keep the COMPUTE_EVAL_BREAKER() call in that case, the console control-event case can be distinguished via PyGILState_GetThisThreadState(). It returns NULL if there's no thread state, i.e. WINAPI TlsGetValue returns NULL.

----------
stage: patch review -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42296>
_______________________________________


More information about the Python-bugs-list mailing list