summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2022-05-28 00:56:30 (GMT)
committerGitHub <noreply@github.com>2022-05-28 00:56:30 (GMT)
commit36374251aa39c0a89be277fb76439bacc709f8b7 (patch)
treea3bba5dee5d355f132201b514ba73ebe01838a16 /Python/pystate.c
parentcf63b80bc482ef971ecb6d3ed9a1dc4a93d73744 (diff)
downloadcpython-36374251aa39c0a89be277fb76439bacc709f8b7.zip
cpython-36374251aa39c0a89be277fb76439bacc709f8b7.tar.gz
cpython-36374251aa39c0a89be277fb76439bacc709f8b7.tar.bz2
[3.11] bpo-40514: Drop EXPERIMENTAL_ISOLATED_SUBINTERPRETERS (gh-93185) (GH-93306)
(cherry picked from commit caa279d6fd5f151e57f891cd4f6ba51b532501c6) This was added for bpo-40514 (gh-84694) to test out a per-interpreter GIL. However, it has since proven unnecessary to keep the experiment in the repo. (It can be done as a branch in a fork like normal.) So here we are removing: * the configure option * the macro * the code enabled by the macro Automerge-Triggered-By: GH:ericsnowcurrently
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 3e28a6a..df56c05 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -1165,14 +1165,6 @@ _PyThreadState_DeleteExcept(_PyRuntimeState *runtime, PyThreadState *tstate)
}
-#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
-PyThreadState*
-_PyThreadState_GetTSS(void) {
- return PyThread_tss_get(&_PyRuntime.gilstate.autoTSSkey);
-}
-#endif
-
-
PyThreadState *
_PyThreadState_UncheckedGet(void)
{
@@ -1192,11 +1184,7 @@ PyThreadState_Get(void)
PyThreadState *
_PyThreadState_Swap(struct _gilstate_runtime_state *gilstate, PyThreadState *newts)
{
-#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
- PyThreadState *oldts = _PyThreadState_GetTSS();
-#else
PyThreadState *oldts = _PyRuntimeGILState_GetThreadState(gilstate);
-#endif
_PyRuntimeGILState_SetThreadState(gilstate, newts);
/* It should not be possible for more than one thread state
@@ -1215,9 +1203,6 @@ _PyThreadState_Swap(struct _gilstate_runtime_state *gilstate, PyThreadState *new
errno = err;
}
#endif
-#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
- PyThread_tss_set(&gilstate->autoTSSkey, newts);
-#endif
return oldts;
}
@@ -1665,9 +1650,7 @@ PyGILState_Ensure(void)
/* Ensure that _PyEval_InitThreads() and _PyGILState_Init() have been
called by Py_Initialize() */
-#ifndef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
assert(_PyEval_ThreadsInitialized(runtime));
-#endif
assert(gilstate->autoInterpreterState);
PyThreadState *tcur = (PyThreadState *)PyThread_tss_get(&gilstate->autoTSSkey);