Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! fixup! Add news entry
  • Loading branch information
pablogsal committed Oct 7, 2022
commit 9a1592a24ce1adbeeaa97bc921f8e221cad174ca
14 changes: 7 additions & 7 deletions Python/ceval_gil.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,13 +942,6 @@ _Py_HandlePending(PyThreadState *tstate)
struct _ceval_runtime_state *ceval = &runtime->ceval;
struct _ceval_state *interp_ceval_state = &tstate->interp->ceval;

/* GC scheduled to run */
if (_Py_atomic_load_relaxed_int32(&interp_ceval_state->gc_scheduled)) {
_Py_atomic_store_relaxed(&interp_ceval_state->gc_scheduled, 0);
_Py_RunGC(tstate);
COMPUTE_EVAL_BREAKER(tstate->interp, ceval, interp_ceval_state);
}

/* Pending signals */
if (_Py_atomic_load_relaxed_int32(&ceval->signals_pending)) {
if (handle_signals(tstate) != 0) {
Expand All @@ -963,6 +956,13 @@ _Py_HandlePending(PyThreadState *tstate)
}
}

/* GC scheduled to run */
if (_Py_atomic_load_relaxed_int32(&interp_ceval_state->gc_scheduled)) {
_Py_atomic_store_relaxed(&interp_ceval_state->gc_scheduled, 0);
_Py_RunGC(tstate);
COMPUTE_EVAL_BREAKER(tstate->interp, ceval, interp_ceval_state);
Comment thread
pablogsal marked this conversation as resolved.
Outdated
}

/* GIL drop request */
if (_Py_atomic_load_relaxed_int32(&interp_ceval_state->gil_drop_request)) {
/* Give another thread a chance */
Expand Down