Hacker News new | ask | show | jobs
by qsort 779 days ago
Bingo. Whenever new coroutines are scheduled to be executed sometime in the future, something somewhere needs to keep them sorted so that the event loop knows how to dequeue them.

It's funny to show this to someone new to CS, but I wouldn't be surprised if you could look at the source for the asyncio implementation and figure out exactly what sorting algorithm you are "actually" using.