ya-csv icon indicating copy to clipboard operation
ya-csv copied to clipboard

reader.pause() doesn't seem to work

Open Leekao opened this issue 9 years ago • 1 comments

I'm trying to pause the readstream after 500 lines but it does not seem to work :/ this is my code (in coffeescript): reader.addListener 'data', (data) -> lines++ console.log "passed line #{lines}",data @pause() return I expect this code to read only 1 line and than pause and it doesn't stop, am I missing smthing?

Leekao avatar May 13 '15 11:05 Leekao

I ran into this problem. The pause will pause the stream, but if the buffer already has data in it, it will continue to process until it reaches the end of the buffer.

ChrisAlvares avatar Jan 31 '17 16:01 ChrisAlvares