- From: Andrea Giammarchi <notifications@github.com>
- Date: Mon, 30 Mar 2015 05:58:22 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Message-ID: <whatwg/fetch/issues/27/87667735@github.com>
It does make sense to me but I've created something I had to explain already few times because unknown as pattern. I think this is inevitable though, we need to re-think promises in order to find a successful cancel pattern, IMO, cause what we have now does not simply work for that :-) On Mar 30, 2015 2:47 PM, "Jake Archibald" <notifications@github.com> wrote: > @WebReflection <https://github.com/WebReflection> > > However in my initial design .cancel(why) was working as resolution for > the promise > > Well, because of the scoping of your cancel function (which looks weird > but is great in practice), you have easy access to resolve and reject. > Maybe, after the cancel callback is called, reject(undefined) is called > automatically. That means the cancel callback *could* call resolve/reject > itself. That means the creator of the promise could resolve with a partial > value if that makes sense. > > — > Reply to this email directly or view it on GitHub > <https://github.com/whatwg/fetch/issues/27#issuecomment-87664371>. > --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/27#issuecomment-87667735
Received on Monday, 30 March 2015 12:58:44 UTC