dominictarr / through

simple way to create a ReadableWritable stream that works
Other
669 stars 64 forks source link

this.emit switches into old steam mode on 0.10? #15

Open ghost opened 11 years ago

ghost commented 11 years ago

HI, just to clarify, if i use through.emit in node v0.10, then I'm switching into old stream mode. So is it correct to say if I use something like event-stream.parse() in my pipeline (which uses through.emit()), then I'm going to break my pipeline down to old stream mode, where data comes eagerly? Im reading tons of json and want to make sure backpressure gets applied so I dont overrun my memory. Thanks!

dominictarr commented 11 years ago

hmm, I think a stream only goes to old mode when you assign a 'data' listener. pipe can handle new and old, though.

also, through fully supports back pressure, it just does it the old way.

so you should be fine.