tc39 / proposal-cancelable-promises

Former home of the now-withdrawn cancelable promises proposal for JavaScript
Other
375 stars 29 forks source link

Promise.prototype.finally #3

Closed benjamingr closed 9 years ago

benjamingr commented 9 years ago

It would be interesting to consider the addition of .finally to the promises specification when cancellable promises land - and it would be interested to consider running finally blocks on cancelled promises. This is for example what bluebird does.

jakearchibald commented 9 years ago

This is the intention, and already implemented in this project,

benjamingr commented 9 years ago

Awesome, I didn't see any specification document only a promise.js that had a finally.

I thought about suggesting a .finally to JS promises but then remembered that it makes more sense to bind it to cancellation so I went to this repo and opened an issue.

Thanks

jakearchibald commented 9 years ago

The aim is to get a prototype working, then ensure the prototype is written spec-like, then spec.

benjamingr commented 9 years ago

Awesome - it'd be great to be kept in the loop (and also @pektaantonov) so future plans for bluebird can be aligned with spec cancellation as from what I see they are very close anyway.

On Sun, Jun 14, 2015 at 3:17 PM, Jake Archibald notifications@github.com wrote:

The aim is to get a prototype working, then ensure the prototype is written spec-like, then spec.

— Reply to this email directly or view it on GitHub https://github.com/domenic/cancelable-promise/issues/3#issuecomment-111821189 .

jakearchibald commented 9 years ago

Yeah, we're taking a lot of cues from Bluebird, there are only a couple of small differences https://gist.github.com/jakearchibald/9a24f3c06f06b9c06a1e#comment-1469960