Skip to content

Conversation

@kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Oct 24, 2025

Optimize asyncio.all_tasks() for the common case where the event loop is running in the current thread by avoiding stop-the-world pause and locking. This optimization is already present for asyncio.current_task() so we do the same for asyncio.all_tasks().

… is running

in the current thread by avoiding stop-the-world pauses and locking.

This optimization is already present for asyncio.current_task() so we
do the same for asyncio.all_tasks().
Copy link
Contributor

@colesbury colesbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kumaraditya303 kumaraditya303 merged commit 95e5d59 into python:main Oct 24, 2025
43 checks passed
@kumaraditya303 kumaraditya303 deleted the all-tasks branch October 24, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants