mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
bpo-40514: Drop EXPERIMENTAL_ISOLATED_SUBINTERPRETERS (gh-93185)
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
This commit is contained in:
parent
e6a57678ca
commit
caa279d6fd
18 changed files with 9 additions and 233 deletions
|
|
@ -1932,20 +1932,6 @@ _run_script_in_interpreter(PyInterpreterState *interp, const char *codestr,
|
|||
return -1;
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
|
||||
// Switch to interpreter.
|
||||
PyThreadState *new_tstate = PyInterpreterState_ThreadHead(interp);
|
||||
PyThreadState *save1 = PyEval_SaveThread();
|
||||
|
||||
(void)PyThreadState_Swap(new_tstate);
|
||||
|
||||
// Run the script.
|
||||
_sharedexception *exc = NULL;
|
||||
int result = _run_script(interp, codestr, shared, &exc);
|
||||
|
||||
// Switch back.
|
||||
PyEval_RestoreThread(save1);
|
||||
#else
|
||||
// Switch to interpreter.
|
||||
PyThreadState *save_tstate = NULL;
|
||||
if (interp != PyInterpreterState_Get()) {
|
||||
|
|
@ -1963,7 +1949,6 @@ _run_script_in_interpreter(PyInterpreterState *interp, const char *codestr,
|
|||
if (save_tstate != NULL) {
|
||||
PyThreadState_Swap(save_tstate);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Propagate any exception out to the caller.
|
||||
if (exc != NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue