Next up: exception handling doesn't work if you never catch exceptions! Followed by, assigning a pointer to another variable doesn't assign the value the pointer points to! :P
For me I still had my mental model from a lazy execution environment (Dask) and that’s where my misconception came from.
That said, I agree with the GP. I immediately saw that it was going to execute sequentially and thought nothing of it. Most of the time I use async/await not for concurrency but for syntax sugar and to get proper exceptions from promise based APIs instead of the GOTO FAIL control flow breaking nonsense that is catch().
const getPeople = async () => (await Promise.all(...)).flat()
Without await this would be
const getPeople = () => Promise.all(...).then(arrs => arrs.flat())
The difference is slight to be sure, but I usually prefer the await approach.
Even Wikipedia says the async/await pattern "allows an asynchronous, non-blocking function to be structured in a way similar to an ordinary synchronous function."
Honestly not sure how this made it to even 20 points.
It's also behaves like synchronous I/O, which is the whole point of the notation.
Which isn't to say all is rosy in async/await world. Debugging them (in JS in particular) is particularly painful.
async/await is clearer to me after reading this article though.
This is a fairly common mistake, but it’s also easy to spot.