You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Store and use the current task of asyncio on thread state for all threads #129898
asyncio currently stores the current task in a global dict _current_tasks and on thread state. Storing it on dict in free-threading will cause significant contention under many threads and such I propose to remove it and always rely on the task stored on the thread state.
This has the added benefit that external introspection will always have the correct task and it will be guaranteed by this implementation while also being performant.
Activity
gh-129898: per-thread current task implementation in asyncio (#129899)