Skip to content

Commit

Permalink
pythongh-110752: Reset ceval.eval_breaker to 0 in `interpreter_clea…
Browse files Browse the repository at this point in the history
  • Loading branch information
gaogaotiantian authored and Glyphack committed Jan 27, 2024
1 parent 6491d39 commit 3799ce9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reset ``ceval.eval_breaker`` in :func:`interpreter_clear`
4 changes: 4 additions & 0 deletions Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,10 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)

Py_CLEAR(interp->audit_hooks);

// At this time, all the threads should be cleared so we don't need
// atomic operations for eval_breaker
interp->ceval.eval_breaker = 0;

for (int i = 0; i < _PY_MONITORING_UNGROUPED_EVENTS; i++) {
interp->monitors.tools[i] = 0;
}
Expand Down

0 comments on commit 3799ce9

Please sign in to comment.