Bergi
Bergi
The next question, after deciding what is a cancellation token, is what the constructor should do when something was passed but it's invalid. The default would be _do nothing_, but...
@ljharb But I don't know any scripts that pass something token-like as an argument besides the constructor. Of course it is a breaking change to introduce a second parameter, but...
https://github.com/tc39/proposal-cancellation/issues/22 looks like a step forward in this direction
See now at https://github.com/tc39/proposal-cancelable-promises/issues/53
@rtm "resolved" is the [correct and official terminology](http://stackoverflow.com/a/29269515/1048572). I don't think I'm violating any semantics. If a promise has an associated token, the cancellation races against the settling (fulfillment/rejection) via...
@ljharb The general distinction(/casting?) issue is discussed in #3, we can settle on anything there. For the matter of this feature, let's assume that we detect them by checking whether...
@rtm > I'm by no means any kind of promises guru and I am sure that this approach has lots of holes. The advantage is that is requires no tokens....
@rtm > we may be trying to introduce synchronous paradigms for cancellation into the decidedly asynchronous world of promises. The link you reference purports to justify why synchronous promise state...
> The issue here is of course is that `A`, `B`, and `C` must be "prepared in advance" as cancellable promises with an explicit pre-specified associated cancelling promise Indeed. If...
Interesting, but I've already [made a case for rejection](https://github.com/bergus/promise-cancellation/blob/master/README.md#how-to-represent-the-cancellation-result-in-the-promises).