Skip to content

Doubling up #4

Open
Open

Description

@ForbesLindesay

Do we need to support propagating more progress events than we recieve?

promiseA
  .then(null, null, function (val, prop) { prop(0); prop(1);});

Activity

  1. novemberborn commented on Dec 24, 2012

    @novemberborn

    That could easily be written as:

    var promiseB = promiseA.constructor(function(resolver){
      promiseA.then(resolver.fulfill, resolver.reject, function(val){
        resolver.progress(0);
        resolver.progress(1);
      });
    });

    And of course libraries could provide a utility methods for that abstraction.

  2. ForbesLindesay commented on Dec 24, 2012

    @ForbesLindesay
    MemberAuthor

    True, but that requires breaking your nice clean chain of thens.

  3. domenic commented on Dec 24, 2012

    @domenic
    Member

    The OP idea seems a bit unwise given that you could do setTimeout(prop, 50, 100);

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