diff options
author | Victor Stinner <vstinner@python.org> | 2020-06-05 00:34:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-05 00:34:14 (GMT) |
commit | 78a02c2568714562e23e885b6dc5730601f35226 (patch) | |
tree | 167982aa5857ae92f0dd301aaa3e22e908a9d9a1 /Python/pylifecycle.c | |
parent | 88ec9190105c9b03f49aaef601ce02b242a75273 (diff) | |
download | cpython-78a02c2568714562e23e885b6dc5730601f35226.zip cpython-78a02c2568714562e23e885b6dc5730601f35226.tar.gz cpython-78a02c2568714562e23e885b6dc5730601f35226.tar.bz2 |
bpo-40521: Make async gen free lists per-interpreter (GH-20643)
Each interpreter now has its own asynchronous generator free lists:
* Move async gen free lists into PyInterpreterState.
* Move _PyAsyncGen_MAXFREELIST define to pycore_interp.h
* Add _Py_async_gen_state structure.
* Add tstate parameter to _PyAsyncGen_ClearFreeLists
and _PyAsyncGen_Fini().
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 09d4d88..073973e 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1270,7 +1270,11 @@ finalize_interp_types(PyThreadState *tstate, int is_main_interp) if (is_main_interp) { _Py_HashRandomization_Fini(); _PyArg_Fini(); - _PyAsyncGen_Fini(); + } + + _PyAsyncGen_Fini(tstate); + + if (is_main_interp) { _PyContext_Fini(); } |