From e005ead49b1ee2b1507ceea94e6f89c28ecf1f81 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 5 Jun 2020 02:56:37 +0200 Subject: bpo-40521: Make context free list per-interpreter (GH-20644) Each interpreter now has its own context free list: * Move context free list into PyInterpreterState. * Add _Py_context_state structure. * Add tstate parameter to _PyContext_ClearFreeList() and _PyContext_Fini(). * Pass tstate to clear_freelists(). --- Python/pylifecycle.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Python/pylifecycle.c') diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 073973e132..6d2eb1defc 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1273,10 +1273,7 @@ finalize_interp_types(PyThreadState *tstate, int is_main_interp) } _PyAsyncGen_Fini(tstate); - - if (is_main_interp) { - _PyContext_Fini(); - } + _PyContext_Fini(tstate); /* Cleanup Unicode implementation */ _PyUnicode_Fini(tstate); -- cgit v1.2.1