On 15 November 2013 17:11, James Coglan <[email protected]> wrote: > On 15 November 2013 17:08, James Coglan <[email protected]> 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 [email protected] To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
