summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-05-05 19:23:00 (GMT)
committerGitHub <noreply@github.com>2023-05-05 19:23:00 (GMT)
commit55671fe04700ccb4e73c8db3dd1e9c031dafe700 (patch)
tree88902724b881874e7c45b6c8386c7e9a9e9c0d58 /Modules
parentd00d94214971621e6a3541425ee8c8072023ca1a (diff)
downloadcpython-55671fe04700ccb4e73c8db3dd1e9c031dafe700.zip
cpython-55671fe04700ccb4e73c8db3dd1e9c031dafe700.tar.gz
cpython-55671fe04700ccb4e73c8db3dd1e9c031dafe700.tar.bz2
gh-99113: Share the GIL via PyInterpreterState.ceval.gil (gh-104203)
In preparation for a per-interpreter GIL, we add PyInterpreterState.ceval.gil, set it to the shared GIL for each interpreter, and use that rather than using _PyRuntime.ceval.gil directly. Note that _PyRuntime.ceval.gil is still the actual GIL.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_xxsubinterpretersmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_xxsubinterpretersmodule.c b/Modules/_xxsubinterpretersmodule.c
index 95273ab..433fecf 100644
--- a/Modules/_xxsubinterpretersmodule.c
+++ b/Modules/_xxsubinterpretersmodule.c
@@ -513,6 +513,7 @@ interp_create(PyObject *self, PyObject *args, PyObject *kwds)
// Create and initialize the new interpreter.
PyThreadState *save_tstate = _PyThreadState_GET();
+ assert(save_tstate != NULL);
const PyInterpreterConfig config = isolated
? (PyInterpreterConfig)_PyInterpreterConfig_INIT
: (PyInterpreterConfig)_PyInterpreterConfig_LEGACY_INIT;