We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6551bfa commit f19e28dCopy full SHA for f19e28d
1 file changed
Python/pylifecycle.c
@@ -1994,6 +1994,7 @@ resolve_final_tstate(_PyRuntimeState *runtime)
1994
}
1995
else {
1996
/* Fall back to the current tstate. It's better than nothing. */
1997
+ // XXX No it's not
1998
main_tstate = tstate;
1999
2000
@@ -2018,6 +2019,8 @@ _Py_Finalize(_PyRuntimeState *runtime)
2018
2019
2020
/* Get final thread state pointer. */
2021
PyThreadState *tstate = resolve_final_tstate(runtime);
2022
+ // We must be in the main interpreter
2023
+ assert(tstate->interp == &runtime->_main_interpreter);
2024
2025
// Block some operations.
2026
tstate->interp->finalizing = 1;
0 commit comments