diff options
author | Ken Jin <kenjin@python.org> | 2024-07-16 17:09:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-16 17:09:58 (GMT) |
commit | 69c68de43aef03dd52fabd21f99cb3b0f9329201 (patch) | |
tree | ff89964ba8cd1f7232835170a191b652c996000a /Python | |
parent | 8f2532168b4630e413a42ccb5e458708808702ea (diff) | |
download | cpython-69c68de43aef03dd52fabd21f99cb3b0f9329201.zip cpython-69c68de43aef03dd52fabd21f99cb3b0f9329201.tar.gz cpython-69c68de43aef03dd52fabd21f99cb3b0f9329201.tar.bz2 |
gh-121621: Move asyncio running loop to thread state (GH-121695)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pystate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 602b13e..f77a2cc 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -1499,6 +1499,8 @@ init_threadstate(_PyThreadStateImpl *_tstate, tstate->previous_executor = NULL; tstate->dict_global_version = 0; + tstate->asyncio_running_loop = NULL; + tstate->delete_later = NULL; llist_init(&_tstate->mem_free_queue); @@ -1700,6 +1702,8 @@ PyThreadState_Clear(PyThreadState *tstate) /* Don't clear tstate->pyframe: it is a borrowed reference */ + Py_CLEAR(tstate->asyncio_running_loop); + Py_CLEAR(tstate->dict); Py_CLEAR(tstate->async_exc); |