Skip to content

Commit 3c208c2

Browse files
committed
Recover assert
1 parent 46c2709 commit 3c208c2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Python/pystate.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,6 +1845,11 @@ _PyThreadState_RemoveExcept(PyThreadState *tstate)
18451845
{
18461846
assert(tstate != NULL);
18471847
PyInterpreterState *interp = tstate->interp;
1848+
_PyRuntimeState *runtime = interp->runtime;
1849+
1850+
#ifdef Py_GIL_DISABLED
1851+
assert(runtime->stoptheworld.world_stopped);
1852+
#endif
18481853

18491854
INTERP_HEAD_LOCK(interp);
18501855
/* Remove all thread states, except tstate, from the linked list of

0 commit comments

Comments
 (0)