4 ms·
I’m JS illiterate but I think control is returned to the main thread until the await call returns, at which time the execution continues.
by 0x445442 4y ago
I’m JS illiterate but I think control is returned to the main thread until the await call returns, at which time the execution continues.
- still_grokking 4y agoJS is single threaded. 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`…).