mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
[3.13] gh-121621: Move asyncio running loop to thread state (GH-121695) (GH-121864)
gh-121621: Move asyncio running loop to thread state (GH-121695)
(cherry picked from commit 69c68de43a
)
Co-authored-by: Ken Jin <kenjin@python.org>
This commit is contained in:
parent
54db42fe2c
commit
06d76c4b94
7 changed files with 18 additions and 111 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue