-
Notifications
You must be signed in to change notification settings - Fork 147
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
propagation of _.nil in async scenario #173
Comments
If you call It's definitely a bug not to Here's another, related, bug with var s = _([1, 2])
.consume(function(err, x, push, next) {
if (err !== null) {
push(err);
next();
}
else if (x === _.nil) {
push(null, x);
}
else {
if (x === 1) {
setImmediate(function () {
push(null, x);
next();
});
} else {
push(null, x);
next();
}
}
})
s.toArray(_.log);
// => [2, 1] I'll take ownership of this, since what I'm working on for #41 is related. |
Actually, what I mentioned is not a bug. It doesn't happen. I seemed to be working with the wrong branch. |
This involves: - Totally reimplementing stream redirection. - Reimplementing `consume`, `pull`, `fork`, and `resume`. Backward incompatible; - The stream no longer pauses if `next` isn't synchronously called in `consume`, since this is no longer necessary to signal (lack of) demand to the source. - Lots of methods and properties that start with `_` changed (these were private anyway). - The callback for the stream generator and `consume` is guaranteed not to be called a second time until `next` is called. Fixes: - caolan#41 - caolan#141 - caolan#142 - caolan#173
This involves: - Totally reimplementing stream redirection. - Reimplementing `consume`, `pull`, `fork`, and `resume`. Backward incompatible; - The stream no longer pauses if `next` isn't synchronously called in `consume`, since this is no longer necessary to signal (lack of) demand to the source. - Lots of methods and properties that start with `_` changed (these were private anyway). - The callback for the stream generator and `consume` is guaranteed not to be called a second time until `next` is called. Fixes: - caolan#41 - caolan#141 - caolan#142 - caolan#173
This involves: - Totally reimplementing stream redirection. - Reimplementing `consume`, `pull`, `fork`, and `resume`. Backward incompatible; - The stream no longer pauses if `next` isn't synchronously called in `consume`, since this is no longer necessary to signal (lack of) demand to the source. - Lots of methods and properties that start with `_` changed (these were private anyway). - The callback for the stream generator and `consume` is guaranteed not to be called a second time until `next` is called. Fixes: - caolan#41 - caolan#141 - caolan#142 - caolan#173
This involves: - Totally reimplementing stream redirection. - Reimplementing `consume`, `pull`, `fork`, and `resume`. Backward incompatible; - The stream no longer pauses if `next` isn't synchronously called in `consume`, since this is no longer necessary to signal (lack of) demand to the source. - Lots of methods and properties that start with `_` changed (these were private anyway). - The callback for the stream generator and `consume` is guaranteed not to be called a second time until `next` is called. Fixes: - caolan#41 - caolan#141 - caolan#142 - caolan#173
This involves: - Totally reimplementing stream redirection. - Reimplementing `consume`, `pull`, `fork`, and `resume`. Backward incompatible; - The stream no longer pauses if `next` isn't synchronously called in `consume`, since this is no longer necessary to signal (lack of) demand to the source. - Lots of methods and properties that start with `_` changed (these were private anyway). - The callback for the stream generator and `consume` is guaranteed not to be called a second time until `next` is called. Fixes: - caolan#41 - caolan#141 - caolan#142 - caolan#173
This involves: - Totally reimplementing stream redirection. - Reimplementing `consume`, `pull`, `fork`, and `resume`. Backward incompatible; - The stream no longer pauses if `next` isn't synchronously called in `consume`, since this is no longer necessary to signal (lack of) demand to the source. - Lots of methods and properties that start with `_` changed (these were private anyway). - The callback for the stream generator and `consume` is guaranteed not to be called a second time until `next` is called. Fixes: - #41 - #141 - #142 - #173
This involves: - Totally reimplementing stream redirection. - Reimplementing `consume`, `pull`, `fork`, and `resume`. Backward incompatible; - The stream no longer pauses if `next` isn't synchronously called in `consume`, since this is no longer necessary to signal (lack of) demand to the source. - Lots of methods and properties that start with `_` changed (these were private anyway). - The callback for the stream generator and `consume` is guaranteed not to be called a second time until `next` is called. Fixes: - #41 - #141 - #142 - #173
This involves: - Totally reimplementing stream redirection. - Reimplementing `consume`, `pull`, `fork`, and `resume`. Backward incompatible; - The stream no longer pauses if `next` isn't synchronously called in `consume`, since this is no longer necessary to signal (lack of) demand to the source. - Lots of methods and properties that start with `_` changed (these were private anyway). - The callback for the stream generator and `consume` is guaranteed not to be called a second time until `next` is called. Fixes: - #41 - #141 - #142 - #173
Hello,
I had a 'freeze' bug in a complex pipeline that I managed to simplify to the following.
I had the impression that this should log
first nil
andsecond nil
(which it does in the sync case) but by forwarding the _.nil in an async fashion with setImmediate as a test, onlyfirst nil
is logged.Am I missing something ?
I noticed that if I call
next()
in the async case, then it starts working again so I concluded that there is either a bug or something that I don't understand about callingnext()
in the _.nil caseThe text was updated successfully, but these errors were encountered: