Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reader.pause() doesn't seem to work #41

Open
Leekao opened this issue May 13, 2015 · 1 comment
Open

reader.pause() doesn't seem to work #41

Leekao opened this issue May 13, 2015 · 1 comment

Comments

@Leekao
Copy link

Leekao commented May 13, 2015

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?

@ChrisAlvares
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants