Closed osdio closed 9 years ago
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!
Ok, can you describe the idea of abort promise?
@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.
@soliury I just pushed an initial prototype here: https://github.com/cujojs/when/pull/415
It's nowhere near complete, and there are plenty of things to think about :) Please feel free to jump into the discussion!
I think it makes sense to close this issue, since we can track progress in the pull request.
Sometimes , I want to abort a promise, How do it ? Such as : https://github.com/promises-aplus/cancellation-spec/issues/12