Re:Show HN: Cancelable async primitives for JavaScript
by SpacePotatoe on Tuesday August 08, 2017 @05:52PM
(#14963211)
Is it possible to use it with async/await?
[ Parent
| on HN ]
Re:Show HN: Cancelable async primitives for JavaScript
by Mitranim on Tuesday August 08, 2017 @05:54PM
(#14963228)
Futures automatically coerce to promises, so yes.
Even better, they come with generator-based coroutines that work with futures, and are automatically cancelable: https://github.com/Mitranim/posterus#routine
You can even run it with Koa 2 instead of async/await: https://github.com/Mitranim/koa-ring