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

Doubling up #4

Open
ForbesLindesay opened this issue Dec 23, 2012 · 3 comments
Open

Doubling up #4

ForbesLindesay opened this issue Dec 23, 2012 · 3 comments

Comments

@ForbesLindesay
Copy link
Member

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

promiseA
  .then(null, null, function (val, prop) { prop(0); prop(1);});
@novemberborn
Copy link

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.

@ForbesLindesay
Copy link
Member Author

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

@domenic
Copy link
Member

domenic commented Dec 24, 2012

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants