Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Need a synchronous version of Readline #25546

Closed
manikawnth opened this issue Jun 19, 2015 · 1 comment
Closed

Need a synchronous version of Readline #25546

manikawnth opened this issue Jun 19, 2015 · 1 comment

Comments

@manikawnth
Copy link

Readline continuously emits 'line' events.
We need a synchronous capability with an option {pause:true} where after every 'line' event it goes to paused mode. And only after the consumer listens the event, he should invoke 'resume' to resume the next line event.

There are many use cases for file read stream as input for readline

@jasnell
Copy link
Member

jasnell commented Jun 24, 2015

Realistically, it's not very likely that this would get implemented in the core API. You ought to be able to use a module like async to accomplish something like this, however.... (or perhaps one of the available Promise implementations)

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

No branches or pull requests

3 participants