mirror of
https://github.com/python/cpython.git
synced 2025-10-27 16:57:08 +00:00
bpo-39984: trip_signal() uses PyGILState_GetThisThreadState() (GH-19061)
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.
This commit is contained in:
parent
1c60567b9a
commit
8849e5962b
3 changed files with 19 additions and 13 deletions
|
|
@ -19,11 +19,9 @@ extern void _Py_FinishPendingCalls(PyThreadState *tstate);
|
|||
extern void _PyEval_InitRuntimeState(struct _ceval_runtime_state *);
|
||||
extern void _PyEval_InitState(struct _ceval_state *);
|
||||
extern void _PyEval_FiniThreads(PyThreadState *tstate);
|
||||
PyAPI_FUNC(void) _PyEval_SignalReceived(
|
||||
struct _ceval_runtime_state *ceval);
|
||||
PyAPI_FUNC(void) _PyEval_SignalReceived(PyThreadState *tstate);
|
||||
PyAPI_FUNC(int) _PyEval_AddPendingCall(
|
||||
PyThreadState *tstate,
|
||||
struct _ceval_runtime_state *ceval,
|
||||
int (*func)(void *),
|
||||
void *arg);
|
||||
PyAPI_FUNC(void) _PyEval_SignalAsyncExc(PyThreadState *tstate);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue