gh-140414: add fastpath for current running loop in `asyncio.all_tasks` (#140542)
Optimize `asyncio.all_tasks()` for the common case where the event loop 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()`.
K
Kumar Aditya committed
95e5d596308620acbd860ec25a40ef95c2b62eaa
Parent: ebf9938
Committed by GitHub <noreply@github.com>
on 10/24/2025, 2:32:17 PM