STINNER Victor added the comment:
I modified _PyEval_AddPendingCall() to accept interp rather than tstate to fix
bpo-40082:
New changeset b54a99d6432de93de85be2b42a63774f8b4581a0 by Victor Stinner in
branch 'master':
bpo-40082: trip_signal() uses the main interpreter (GH-19441)
https://githu
New submission from STINNER Victor :
Currently, _Py_ThreadCanHandlePendingCalls() only returns true if the current
thread is the Python "main thread" (_PyRuntime.main_thread).
_PyRuntime.main_thread is initialized by _PyRuntime_Initialize().
The problem is that a subinterpreter can run a sepa