Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a method to abort a promise? #414

Closed
osdio opened this issue Dec 14, 2014 · 5 comments
Closed

Is there a method to abort a promise? #414

osdio opened this issue Dec 14, 2014 · 5 comments

Comments

@osdio
Copy link

osdio commented Dec 14, 2014

Sometimes , I want to abort a promise, How do it ?
Such as : promises-aplus/cancellation-spec#12

@briancavalier
Copy link
Member

Hi @soliury, there is no cancel/abort in when.js right now. It's a tricky issue, especially when combining promises with all, race, etc. However, @mjackson and I recently started prototyping some ideas. We're hoping to push it to a branch sometime soon. Stay tuned!

@osdio
Copy link
Author

osdio commented Dec 16, 2014

Ok, can you describe the idea of abort promise?

@briancavalier
Copy link
Member

@soliury Sure, it's fairly simple. We did some brainstorming recently in a gist: https://gist.github.com/briancavalier/c416d396e844e31c6efa

There are a couple similar but slightly different approaches there, but that should give you an idea of how we are thinking it would work.

@briancavalier
Copy link
Member

@soliury I just pushed an initial prototype here: #415

It's nowhere near complete, and there are plenty of things to think about :) Please feel free to jump into the discussion!

@briancavalier
Copy link
Member

I think it makes sense to close this issue, since we can track progress in the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants