Skip to content

Is there a method to abort a promise? #414

Closed

Description

@osdio

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

Activity

  1. briancavalier commented on Dec 14, 2014

    @briancavalier
    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!

  2. osdio commented on Dec 16, 2014

    @osdio
    Author

    Ok, can you describe the idea of abort promise?

  3. briancavalier commented on Dec 18, 2014

    @briancavalier
    Member

    @soliury Sure, it's fairly simple. We did some brainstorming recently in a gist: https://github.com/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.

  4. briancavalier commented on Dec 19, 2014

    @briancavalier
    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!

  5. briancavalier commented on Dec 19, 2014

    @briancavalier
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions