Skip to content

Commit 1555731

Browse files
Apply suggestions from code review
Co-authored-by: Eric Snow <[email protected]>
1 parent 76e4ec9 commit 1555731

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Python/pylifecycle.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,7 +1991,6 @@ resolve_final_tstate(_PyRuntimeState *runtime)
19911991

19921992
/* We might want to warn if main_tstate->current_frame != NULL. */
19931993

1994-
assert(main_tstate->interp == main_interp);
19951994
return main_tstate;
19961995
}
19971996

@@ -2007,8 +2006,6 @@ _Py_Finalize(_PyRuntimeState *runtime)
20072006

20082007
/* Get final thread state pointer. */
20092008
PyThreadState *tstate = resolve_final_tstate(runtime);
2010-
// We must be in the main interpreter
2011-
assert(tstate->interp == &runtime->_main_interpreter);
20122009

20132010
// Block some operations.
20142011
tstate->interp->finalizing = 1;
@@ -2513,8 +2510,7 @@ finalize_subinterpreters(void)
25132510
while (interp != NULL) {
25142511
/* Make a tstate for finalization. */
25152512
PyThreadState *tstate = _PyThreadState_NewBound(interp, _PyThreadState_WHENCE_FINI);
2516-
if (tstate == NULL)
2517-
{
2513+
if (tstate == NULL) {
25182514
// XXX Some graceful way to always get a thread state?
25192515
Py_FatalError("thread state allocation failed");
25202516
}

0 commit comments

Comments
 (0)