mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
GH-109369: Merge all eval-breaker flags and monitoring version into one word. (GH-109846)
This commit is contained in:
parent
7c149a76b2
commit
bf4bc36069
13 changed files with 188 additions and 234 deletions
|
@ -1767,9 +1767,8 @@ PyErr_CheckSignals(void)
|
|||
Python code to ensure signals are handled. Checking for the GC here
|
||||
allows long running native code to clean cycles created using the C-API
|
||||
even if it doesn't run the evaluation loop */
|
||||
struct _ceval_state *interp_ceval_state = &tstate->interp->ceval;
|
||||
if (_Py_atomic_load_relaxed(&interp_ceval_state->gc_scheduled)) {
|
||||
_Py_atomic_store_relaxed(&interp_ceval_state->gc_scheduled, 0);
|
||||
if (_Py_eval_breaker_bit_is_set(tstate->interp, _PY_GC_SCHEDULED_BIT)) {
|
||||
_Py_set_eval_breaker_bit(tstate->interp, _PY_GC_SCHEDULED_BIT, 0);
|
||||
_Py_RunGC(tstate);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue