Re: [fetch] Aborting a fetch (#27)

> My code will not invoke that indeed if canceled. My code silently resolve, without invoking. Your example will work without problems.

Aha, I've probably misunderstood you all this time. It sounds like we both agree that the state of the cancelled promise should be "cancelled", rather than "fulfilled" or "rejected".

I also think it should not call `then` or `catch`. If you want to send a reason, then you could do it as @jakearchibald described:

```js
new CancellablePromise(function(resolve, reject, isCancelled){
  isCancelled(() => reject("cancelled"));
})
```

But I don't see how that would work with reference counted cancelling, which is an idea I quite like.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/27#issuecomment-87675221

Received on Monday, 30 March 2015 13:21:16 UTC