What blocks the event loop, and why doesn't async move computation to another thread?
Answer out loud or in your head first, then compare.
Answer
async makes it convenient to wait for a result, but ordinary computation in that function still runs on its thread. If I compute something in a loop for a few seconds, other tasks waiting for the same thread have to wait. That can delay many server responses.
Waiting on the network is different: the environment can handle other operations in the meantime. So first I establish whether the problem is waiting or computing. Heavy file processing can move to a separate thread or process. Adding await in the wrong place won't add CPU power and won't fix the blocking.
Why it matters: Tests understanding of how Node works, not just async syntax.
Possible follow-ups: How do you tell that the server is slow because of computation and not the database?
How did it go? Be honest — “Not yet” puts the question on your review list.
Start with
- B-P01 · What is Node.js, and how is it different from JavaScript in the browser? — JavaScript, TypeScript and Node.js
- B-P04 · What is a Promise? — JavaScript, TypeScript and Node.js
- B-P10 · What does TypeScript give you, and what doesn't it? — JavaScript, TypeScript and Node.js
Related questions
Further reading
- Node.js: The Event Loop(opens in a new tab)Docs; accessed 22.10.2026. Event loop phases, timers and differences between Node/libuv versions.