mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-128002: use per threads tasks linked list in asyncio (#128869)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
b4ff8b22b3
commit
0d68b14a0d
7 changed files with 156 additions and 58 deletions
|
@ -227,6 +227,13 @@ struct _is {
|
|||
PyMutex weakref_locks[NUM_WEAKREF_LIST_LOCKS];
|
||||
_PyIndexPool tlbc_indices;
|
||||
#endif
|
||||
// Per-interpreter list of tasks, any lingering tasks from thread
|
||||
// states gets added here and removed from the corresponding
|
||||
// thread state's list.
|
||||
struct llist_node asyncio_tasks_head;
|
||||
// `asyncio_tasks_lock` is used when tasks are moved
|
||||
// from thread's list to interpreter's list.
|
||||
PyMutex asyncio_tasks_lock;
|
||||
|
||||
// Per-interpreter state for the obmalloc allocator. For the main
|
||||
// interpreter and for all interpreters that don't have their
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue