-
Notifications
You must be signed in to change notification settings - Fork 7
[WIP] Pull-streams #7
Conversation
Just to be sure that I see the same problems as you, can you describe the steps to run this one. |
stream, | ||
pull.collect((err, res) => { | ||
expect(err).to.not.exist.mark() | ||
expect(res).to.be.eql([]).mark() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dignifiedquire why would the collected values be empty arrays?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the other side does not send us anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See l32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And empty array means end of the stream? I see the pull.empty, just confirming that is the right pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pull.collect
, drains the stream and collects all values into an array, or error into err
. It will only be called when the stream ended.
Keeping up state, from me and @dignifiedquire debugging:
|
@@ -17,7 +17,7 @@ module.exports = (common) => { | |||
}) | |||
|
|||
it('10000 messages of 10000 streams', (done) => { | |||
spawn(muxer, 10000, 10000, done) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing values after the callback? Just for testing and not for merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
callback is required, limit is optional, so limit comes after the callback :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is a really new pattern..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's just to annoy you
@dignifiedquire seeing ws tests failing:
Is it missing your ws fix on pull-streams? Other last things before the merge:
|
@diasdavid yes ws will only pass with pull-stream/pull-stream-to-stream#4 |
|
||
In the Node.js case, if no callback is passed, stream will emit an 'ready' event when it is prepared or a 'error' event if it fails to establish the connection, until then, it will buffer the 'write' calls. | ||
In the JavaScript case, if no callback is passed, stream will emit an 'ready' event when it is prepared or a 'error' event if it fails to establish the connection, until then, it will buffer the 'write' calls. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this holds true anymore, maybe it is not even needed. @dignifiedquire
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No dial
will just return a pull-stream ready to be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- change this paragraph
No description provided.