mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Revert "gh-128639: Don't assume one thread in subinterpreter finalization (gh-128640)" (gh-134256)
This reverts commit 9859791f9e
.
The original change broke the iOS and android buildbots, where the tests are run single-process.
This commit is contained in:
parent
871d269875
commit
27bd08273c
6 changed files with 38 additions and 99 deletions
|
@ -1395,12 +1395,9 @@ static int test_audit_subinterpreter(void)
|
|||
PySys_AddAuditHook(_audit_subinterpreter_hook, NULL);
|
||||
_testembed_initialize();
|
||||
|
||||
PyThreadState *tstate = PyThreadState_Get();
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
Py_EndInterpreter(Py_NewInterpreter());
|
||||
PyThreadState_Swap(tstate);
|
||||
}
|
||||
Py_NewInterpreter();
|
||||
Py_NewInterpreter();
|
||||
Py_NewInterpreter();
|
||||
|
||||
Py_Finalize();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue