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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user