Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store current task on the loop in asyncio #128415

Open
kumaraditya303 opened this issue Jan 2, 2025 · 0 comments
Open

Store current task on the loop in asyncio #128415

kumaraditya303 opened this issue Jan 2, 2025 · 0 comments
Labels

Comments

@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Jan 2, 2025

Currently the current task of a loop in stored in a global dict mapping loops to their corresponding current tasks.

/* 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant