by code-e · 9y ago · 0 comments
As an optimization, the cancellation signal propagates
upwards the promise chain so that an ongoing operation e.g.
network request can be aborted.Unfortunately it's still not viable in the browser due to its size, promises too easily get converted into non-cancelables, and worst of all, async/await forces native promises. If you want cancelable coroutines, you're forced to roll a generator-based implementation such as what Posterus provides.