The event loop.
One waiter covers the whole restaurant by refusing to ever stand and watch food cook.
- Just me, yes.1
No second waiter is coming — every table in this room is one thread’s problem.
- You were ready first.2
The queue settles every argument about who is next: whichever task became ready first.
- Yell when it’s done.3
Cooking belongs to the kitchen; the waiter’s entire job is to drop the order and walk away.
- 4
The point is not speed — it is that nobody ever stands watching a pot while someone else could be served.
- On my way back round.5
A finished dish is just a new item in the queue, collected on whichever lap comes next.
- Send help.6
One table that will not stop talking holds the whole room hostage — the loop cannot walk away mid-task.
Semicolony semicolony.dev/eli5/event-loop/comic