Most of the existing implementations do offer a .cancel() method on promises. It would be super slick if we could invoke this when assimilating such a cancellable thenable together with a token (apart from already passing the token into then). I'd imagine doing something like
I guess the more reasonable solution would be update legacy libraries to deal with the token they are passed, just like tasks should do. No need to hassle with this in the spec.
Most of the existing implementations do offer a
.cancel()
method on promises. It would be super slick if we could invoke this when assimilating such a cancellable thenable together with a token (apart from already passing the token intothen
). I'd imagine doing something likein the assimilation sequence (PromiseResolveThenableJob).
This would allow us to do something like
where
cancel()
later would invokebp.cancel()
.Is this feasible? What do you think? Pinging @petkaantonov @benjamingr