If they're not in old mode, you don't have to pause anything. Just don't read() until you want to get some data out. It's effectively "paused" by default.
If they ARE in old mode, then there's nothing wrong with using pause(). However, it sounds like you want read()s of a specific size, so the non-flowing-mode is probably better anyway. On Fri, Jun 21, 2013 at 6:53 PM, John Cole <[email protected]> wrote: > Hello, > I'm trying to read from several streams (3-5) each a very large text file > representing a grid of data. Each file contains the coordinates and the > data value and the coordinates are sorted so each line corresponds to the > the same coordinate in every file. The width of each data value is not the > same, so the size of every line differs. > > Since each file is very large, I'm opening multiple streams and storing > the streams in an array. I can read from each stream on the readable event, > but i'm having trouble slowing the streams down when one of them falls > behind. > > What is the correct way to pause the streams without using the pause and > putting the streams in 'old' mode. Not calling read on each 'readable' > event seems to starve the streams and they close silently. > > Any suggestions? > > Thanks, > > John > > -- > -- > 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. > > -- -- 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.
