Skip to content

Commit

Permalink
address comment: detail unref usecase
Browse files Browse the repository at this point in the history
  • Loading branch information
AnupamaP committed Apr 1, 2021
1 parent a5fe4a9 commit 33a1f72
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,10 @@ the best compatibility if it defines an `output.columns` property and emits
a `'resize'` event on the `output` if or when the columns ever change
([`process.stdout`][] does this automatically when it is a TTY).

In order to end the wait for the `stdin` input stream (so that the program
does not appear to have hanged), `unref` function can be used:
When creating a `readline.Interface` using `stdin` as input stream, the program
will notterminate until it receives `EOF` (<kbd>Ctrl</kbd>+<kbd>D</kbd>).
If you want your application to exit without waiting for user input, you can
`unref` the standard input:

```js
process.stdin.unref();
Expand Down

0 comments on commit 33a1f72

Please sign in to comment.