Is this code really equivalent?
Wouldn't it block on the `await` calls, whereas the original code would instantly pass control back to the caller?
(Sorry if this question is odd. My JS is a little bit rusted).
Wouldn't it block on the `await` calls, whereas the original code would instantly pass control back to the caller?
(Sorry if this question is odd. My JS is a little bit rusted).
I've overlooked the `async` on the first line… My fault. :-|
Async / await is just a code transformation that introduces Promise wrappers.
The code should be equivalent to the original. (I've just overlooked the top-level `async`…).