When await can block the Event Loop?
Many of us treat await as a natural "pause" that lets the event loop handle other work.
Most of the time this is true, but there is a tricky case:
if you await Promises inside of the loop that resolve immediately, your loop can create a long chain of microtasks.
Microtasks are processed before the event loop moves to the next macrotask and every new await creates a new microtask. I recently wrote about a real incident like this (the example is simplified, the system was not).
If you want the full story, here is my Medium article - https://kulikovd.medium.com/when-await-can-block-the-event-loop-54ddff70d9e8 .