4 ms·
Futures automatically coerce to promises, so yes. Even better, they come with generator-based coroutines that work with futures, and are automatically cancelab
by Mitranim 9y ago
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 https://github.com/Mitranim/posterus#routine
You can even run it with Koa 2 instead of async/await: https://github.com/Mitranim/koa-ring https://github.com/Mitranim/koa-ring