mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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
|
@ -68,6 +68,8 @@ struct _ts {
|
|||
pycore_ceval.h. */
|
||||
uintptr_t eval_breaker;
|
||||
|
||||
PyObject *asyncio_running_loop; // Strong reference
|
||||
|
||||
struct {
|
||||
/* Has been initialized to a safe state.
|
||||
|
||||
|
|
|
@ -586,7 +586,6 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
|
|||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__anext__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__annotations__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__args__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__asyncio_running_event_loop__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__await__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__bases__));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(__bool__));
|
||||
|
|
|
@ -75,7 +75,6 @@ struct _Py_global_strings {
|
|||
STRUCT_FOR_ID(__anext__)
|
||||
STRUCT_FOR_ID(__annotations__)
|
||||
STRUCT_FOR_ID(__args__)
|
||||
STRUCT_FOR_ID(__asyncio_running_event_loop__)
|
||||
STRUCT_FOR_ID(__await__)
|
||||
STRUCT_FOR_ID(__bases__)
|
||||
STRUCT_FOR_ID(__bool__)
|
||||
|
|
1
Include/internal/pycore_runtime_init_generated.h
generated
1
Include/internal/pycore_runtime_init_generated.h
generated
|
@ -584,7 +584,6 @@ extern "C" {
|
|||
INIT_ID(__anext__), \
|
||||
INIT_ID(__annotations__), \
|
||||
INIT_ID(__args__), \
|
||||
INIT_ID(__asyncio_running_event_loop__), \
|
||||
INIT_ID(__await__), \
|
||||
INIT_ID(__bases__), \
|
||||
INIT_ID(__bool__), \
|
||||
|
|
|
@ -104,10 +104,6 @@ _PyUnicode_InitStaticStrings(PyInterpreterState *interp) {
|
|||
_PyUnicode_InternStatic(interp, &string);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
assert(PyUnicode_GET_LENGTH(string) != 1);
|
||||
string = &_Py_ID(__asyncio_running_event_loop__);
|
||||
_PyUnicode_InternStatic(interp, &string);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
assert(PyUnicode_GET_LENGTH(string) != 1);
|
||||
string = &_Py_ID(__await__);
|
||||
_PyUnicode_InternStatic(interp, &string);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue