Semicolony ELI5 · comic

The event loop.

One waiter working a full restaurant by never standing still waiting, just taking the next ready task each time around.

  1. Just me today!
    a full room, one waiter
    1

    One waiter runs the whole restaurant — many tables, one person to serve them.

  2. You first.
    task task task next ready one
    2

    So the rule is simple: take the next order that is ready, right now.

  3. Kitchen’s got it.
    KITCHEN hand off, don't wait
    3

    Slow work like cooking is handed to the kitchen — the waiter does not stand and wait.

  4. never idle
    4

    While it cooks, the waiter keeps serving everyone else, never standing idle.

  5. Order up — I’ll grab it.
    ding! food's up picked up next lap
    5

    When the food is up, the waiter picks it up on a later trip around the room.

  6. Nobody move…
    heavy ! everything waits
    6

    The catch: one task that hogs the waiter freezes everyone — keep each task short.

One waiter, a full room: take the next ready task, hand off slow work, never sit idle.
Semicolony semicolony.dev/eli5/event-loop/comic
← All ELI5 explainers