bpo-37127, bpo-39984: * trip_signal() and Py_AddPendingCall() now get the current Python thread state using PyGILState_GetThisThreadState() rather than _PyRuntimeState_GetThreadState() to be able to get it even if the GIL is released. * _PyEval_SignalReceived() now expects tstate rather than ceval. * Remove ceval parameter of _PyEval_AddPendingCall(): ceval is now get from tstate parameter.
|
Py_AddPendingCall() and trip_signal() have an issue if the thread has no Python thread state. But this PR doesn't make the situation better or worse, the problem already existed before. See: https://bugs.python.org/issue37127#msg364543 |
bpo-37127, bpo-39984:
thread state using PyGILState_GetThisThreadState() rather than
_PyRuntimeState_GetThreadState() to be able to get it even if the
GIL is released.
get from tstate parameter.
https://bugs.python.org/issue39984