Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on V8 adds support for top-level await. Parent comment
Async/await are coroutines: they have a shared context, stack, etc. They can be paused and resumed.
The implementation of async/await depends on the engine, but I'm pretty sure they use the same generator backend.
Babel and other transpilers convert async functions actual generator functions. By contrast, promises are a fairly simple runtime library.
There are no comments on this comment yet.
Async/await are coroutines: they have a shared context, stack, etc. They can be paused and resumed.
The implementation of async/await depends on the engine, but I'm pretty sure they use the same generator backend.
Babel and other transpilers convert async functions actual generator functions. By contrast, promises are a fairly simple runtime library.