diff options
Diffstat (limited to 'Python/ceval_gil.c')
-rw-r--r-- | Python/ceval_gil.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Python/ceval_gil.c b/Python/ceval_gil.c index 9b9d7dc1d1a..83f4e91e545 100644 --- a/Python/ceval_gil.c +++ b/Python/ceval_gil.c @@ -819,11 +819,10 @@ make_pending_calls(PyInterpreterState *interp) } /* don't perform recursive pending calls */ - static int busy = 0; - if (busy) { + if (interp->ceval.pending.busy) { return 0; } - busy = 1; + interp->ceval.pending.busy = 1; /* unsignal before starting to call callbacks, so that any callback added in-between re-signals */ @@ -851,11 +850,11 @@ make_pending_calls(PyInterpreterState *interp) } } - busy = 0; + interp->ceval.pending.busy = 0; return res; error: - busy = 0; + interp->ceval.pending.busy = 0; SIGNAL_PENDING_CALLS(interp); return res; } |