bpo-46008: Move thread-related interpreter state into a sub-struct. (gh-29971)

This parallels _PyRuntimeState.interpreters.  Doing this helps make it more clear what part of PyInterpreterState relates to its threads.

https://bugs.python.org/issue46008
This commit is contained in:
Eric Snow 2021-12-07 14:03:47 -07:00 committed by GitHub
parent 8262c96bcc
commit 313f92a57b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 42 additions and 40 deletions

View file

@ -2043,7 +2043,7 @@ Py_EndInterpreter(PyThreadState *tstate)
_PyAtExit_Call(tstate->interp);
if (tstate != interp->tstate_head || tstate->next != NULL) {
if (tstate != interp->threads.head || tstate->next != NULL) {
Py_FatalError("not the last thread");
}