Cancelling promise operation

Skip to first unread message


Jun 8, 2013, 8:19:22 AM6/8/13

I'm currently creating a simple promises implementation based on this specification.

I made a proof of concept based on it to illustrate how promises-based apps could look like :

But i had to deal with an unexpected problem. Some promises are based on events and when a view is hidden, i need to be able to "cancel" those promise. I suppose the same goes for XHR requests.

So i think it lacks of a way to cancel a promise, is there any work on it currently ?

What i done to deal with its problem is saving a Promise.prototype.dispose method in return of the promise logic function. So, when need, when can cancel promises to avoid memory leak like in the Promise.any method that in fact don't wait for each promises to be released.

Have you any feedback to give on promise cancelling ?

Jason Denizac

Jun 9, 2013, 7:16:25 PM6/9/13
Nicolas, active development on the successor to Promises/A is happening at this github organization:

There is a repository there hosting discussion of a proposed cancellation specification.

You received this message because you are subscribed to the Google Groups "CommonJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit
Reply all
Reply to author
0 new messages