4 ms·
This is how async/await is implemented. I think 'await' is almost just a synonym for yield. I didn't invent that part. I just made a faster, better encapsulated
by BenoitEssiambre 6y ago
This is how async/await is implemented. I think 'await' is almost just a synonym for yield. I didn't invent that part. I just made a faster, better encapsulated, promise free version.
- Kwantuum 6y agoI'm failing to see how async/await has more promises than your implementation.
- BenoitEssiambre 6y agoAsync/await requires passing a promise to await. If you read the documentation for async/await, it starts with: "These features basically act as syntactic sugar on top of promises": https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Async_await https://developer.mozilla.org/en-US/docs/Learn/JavaScript/As...