Skip to content

Async

Which one comes back first

Two requests in flight, and the only thing in an event loop that is genuinely unordered.

10 minutes · Promise.all · sequential await · nondeterminism

The one thing nobody controls

The microtask queue is FIFO. The macrotask queue is ordered by delay. Neither is a coin toss, and the checker treats them as the fixed sequences they are.

What is genuinely open is the order the outside world answers in. Two requests sent together can land in either order, and code that quietly assumed one of them is correct most of the time and wrong on the afternoon that matters.

Everything you do here stays in this browser.