hey James,

i think what you need is the objectMode 
http://nodejs.org/api/stream.html#stream_object_mode i think if you don't 
use it, there is no guarrantee that you pushes are kept separated

Am Freitag, 15. November 2013 18:18:18 UTC+1 schrieb James Coglan:
>
> On 15 November 2013 17:11, James Coglan <jco...@gmail.com <javascript:>>wrote:
>
>> On 15 November 2013 17:08, James Coglan <jco...@gmail.com 
>> <javascript:>>wrote:
>>
>>> I'm a bit confused about how the streams2 Readble implementation using 
>>> push() interacts with the on("data") event. Consider these examples. When I 
>>> push 3 times in succession on a Readable, I get one data event with the 
>>> concatenated output, but when I pipe the readable into a Transform, those 
>>> chunks are yielded on at a time.
>>>
>>
>> Ah, just realized what I missed. In R, the chunks are all pushed before a 
>> "data" listener is added, which explains why it gets the buffered output. 
>> Still confused about why the T gets the chunks one by one though. 
>>
>
> One final question: will all push() calls in a Readable or Transform 
> *after* a 'data' listener have been added result in a single corresponding 
> 'data' event? Or can multiple push() calls still get collapsed down to one 
> 'data' event due to the stream being paused, backed up, buffering, etc.? 
>  

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to