Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upDoes es.join work in the browser? #36
Comments
This comment has been minimized.
This comment has been minimized.
|
Sorry, I'm not sure what the problem is here, |
This comment has been minimized.
This comment has been minimized.
amiorin
commented
Aug 9, 2013
|
I would expect to see three times this output :
Sometimes I get :
and sometime only :
|
This comment has been minimized.
This comment has been minimized.
amiorin
commented
Aug 9, 2013
|
I'm trying with request instead of hyperquest. |
This comment has been minimized.
This comment has been minimized.
|
oh, I see the problem: problem is probably that you are creating streams inside of step. step(function () {
hyperquest.get('/').pipe(es.join(this.parallel()))
hyperquest.get('/').pipe(es.join(this.parallel()))
hyperquest.get('/').pipe(es.join(this.parallel()))
}, function (err, a, b, c) {
//I think this will work...
console.log(err, a, b, c)
})The problem is that it was collecting streams into an array, but some of them had actually finished by the time that they get passed to the callback and piped. You need to pipe a (classic stream, 0.8 style) on the first tick after it is created. This way pipes the stream immediately, and just collects the results with step. |
This comment has been minimized.
This comment has been minimized.
amiorin
commented
Aug 9, 2013
|
Thank you very much! |
amiorin commentedAug 9, 2013
It looks it doesn't...
http://requirebin.com/?gist=6192567
I would expect that es.join gives me the body of each hyperquest.