100-lines-of-code-challenge-js
100-lines-of-code-challenge-js copied to clipboard
Deferred race
A few things that I feel quite confused:
- What's the meaning of
oncehere? - Is it necessary that in
Deferred.all().then()we should get all of the results returned by each deferred instance?
@thomasyimgit Thanks for it.
- tiny-deferred is from jQuery.deferred, it based on jQuery.Callback. once method is one of the flags from the Callback, actually I don't remember it's useful in deferred, maybe we should delete it at some time.
- yes, you are right. The return value for each promise instance should as a parameter to next fullfilled function or rejected function.That is my mistake, I create the tiny-deferred at about 1 year ago, at that time, I just want it work as simple, don't thinking too much of it. Sorry about that.