Threads vs async, races, locks, deadlocks, memory models and safe patterns.
Your API spends most of each request waiting for a database and another HTTP service to reply. What does "non-blocking" (asynchronous) I/O mean, and why does it let one server handle many more of these requests at the same time?
People say Node.js and Python's asyncio are built around an "event loop". In simple terms, what is an event loop and what job does it do?
In JavaScript, Python or C#, what does marking a function async and
writing await in front of a call actually do? Does await freeze the
whole program while it waits?
fetch() in JavaScript returns a Promise; HttpClient.GetAsync() in
C# returns a Task. What is a promise (or task, or future), and what
states can it be in?
A junior writes this in a Node.js handler and the log shows
undefined instead of the user's name:
A product page loads like this, and each call takes about 300 ms:
const product = await getProduct(id);