From 89e67ada6958cfd8d4eec221848f81b2619de099 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Mon, 27 Mar 2023 16:53:05 -0600 Subject: gh-100227: Revert gh-102925 "gh-100227: Make the Global Interned Dict Safe for Isolated Interpreters" (gh-103063) This reverts commit 87be8d9. This approach to keeping the interned strings safe is turning out to be too complex for my taste (due to obmalloc isolation). For now I'm going with the simpler solution, making the dict per-interpreter. We can revisit that later if we want a sharing solution. --- Python/pylifecycle.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'Python/pylifecycle.c') diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 5d7f8621833..8110d94ba17 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -636,8 +636,6 @@ pycore_create_interpreter(_PyRuntimeState *runtime, return status; } - _PyThreadState_InitDetached(&runtime->cached_objects.main_tstate, interp); - *tstate_p = tstate; return _PyStatus_OK(); } @@ -1934,8 +1932,6 @@ Py_FinalizeEx(void) // XXX Do this sooner during finalization. // XXX Ensure finalizer errors are handled properly. - _PyThreadState_ClearDetached(&runtime->cached_objects.main_tstate); - finalize_interp_clear(tstate); finalize_interp_delete(tstate->interp); -- cgit v1.2.3