mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Revert: bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (GH-11617) (GH-12159)
* Revert "bpo-36097: Use only public C-API in the_xxsubinterpreters module (adding as necessary). (#12003)" This reverts commitbcfa450f21
. * Revert "bpo-33608: Simplify ceval's DISPATCH by hoisting eval_breaker ahead of time. (gh-12062)" This reverts commitbda918bf65
. * Revert "bpo-33608: Use _Py_AddPendingCall() in _PyCrossInterpreterData_Release(). (gh-12024)" This reverts commitb05b711a2c
. * Revert "bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (GH-11617)" This reverts commitef4ac967e2
.
This commit is contained in:
parent
f4b0a1c0da
commit
4d61e6e3b8
20 changed files with 582 additions and 751 deletions
|
@ -176,7 +176,7 @@ static void drop_gil(PyThreadState *tstate)
|
|||
&_PyRuntime.ceval.gil.last_holder)
|
||||
) == tstate)
|
||||
{
|
||||
RESET_GIL_DROP_REQUEST(tstate->interp);
|
||||
RESET_GIL_DROP_REQUEST();
|
||||
/* NOTE: if COND_WAIT does not atomically start waiting when
|
||||
releasing the mutex, another thread can run through, take
|
||||
the GIL and drop it again, and reset the condition
|
||||
|
@ -213,7 +213,7 @@ static void take_gil(PyThreadState *tstate)
|
|||
if (timed_out &&
|
||||
_Py_atomic_load_relaxed(&_PyRuntime.ceval.gil.locked) &&
|
||||
_PyRuntime.ceval.gil.switch_number == saved_switchnum) {
|
||||
SET_GIL_DROP_REQUEST(tstate->interp);
|
||||
SET_GIL_DROP_REQUEST();
|
||||
}
|
||||
}
|
||||
_ready:
|
||||
|
@ -239,10 +239,10 @@ _ready:
|
|||
MUTEX_UNLOCK(_PyRuntime.ceval.gil.switch_mutex);
|
||||
#endif
|
||||
if (_Py_atomic_load_relaxed(&_PyRuntime.ceval.gil_drop_request)) {
|
||||
RESET_GIL_DROP_REQUEST(tstate->interp);
|
||||
RESET_GIL_DROP_REQUEST();
|
||||
}
|
||||
if (tstate->async_exc != NULL) {
|
||||
_PyEval_SignalAsyncExc(tstate->interp);
|
||||
_PyEval_SignalAsyncExc();
|
||||
}
|
||||
|
||||
MUTEX_UNLOCK(_PyRuntime.ceval.gil.mutex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue