-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Closed
Labels
performancePerformance or resource usagePerformance or resource usagetopic-asynciotopic-free-threading
Description
Currently the current task of a loop in stored in a global dict mapping loops to their corresponding current tasks.
cpython/Modules/_asynciomodule.c
Lines 100 to 104 in 8d16919
/* Dictionary containing tasks that are currently active in | |
all running event loops. {EventLoop: Task} */ | |
PyObject *current_tasks; | |
/* WeakSet containing scheduled 3rd party tasks which don't |
However this will perform poorly in free threading build as such I propose to store it in on the loop itself.
See https://discuss.python.org/t/store-current-task-on-the-loop/75926
Linked PRs
Metadata
Metadata
Assignees
Labels
performancePerformance or resource usagePerformance or resource usagetopic-asynciotopic-free-threading
Projects
Status
Done