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 baedee8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/api/readline.md
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 not
terminate 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 baedee8

Please sign in to comment.