- From: jan-ivar <notifications@github.com>
- Date: Sat, 30 Jan 2016 13:11:24 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Saturday, 30 January 2016 21:11:53 UTC
> See https://jsfiddle.net/v6LrLdsj/
>
> var p = cancellablePromiseFactory();
> p.catch(() => {});
> p.cancel(); // p gets cancelled here
@benjamingr thanks for the fiddle, but I must not be communicating well either. Here you're cancelling at the intersection point. Of course that works. The problem is downstream. In real code there are always reasons to extend a promise chain before returning it, as in fact is the case in the live code I linked to. So my concerns stand. Try https://jsfiddle.net/xev0n48y/
var p = cancellablePromiseFactory();
p.catch(() => {});
p.then(() => {}).cancel(); // callers cancel here
---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/27#issuecomment-177303455
Received on Saturday, 30 January 2016 21:11:53 UTC