GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: add unref for input in readline by AnupamaP · Pull Request #38019 · nodejs/node

Conversation

@AnupamaP

@AnupamaP AnupamaP commented Apr 1, 2021 •
edited by aduh95
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes: #36154

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

spzala reacted with thumbs up emoji szmarczak reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. readline Issues and PRs related to the built-in readline module. labels Apr 1, 2021
@AnupamaP
AnupamaP force-pushed the readline-doc-edit branch 3 times, most recently from 5921b8f to a5fe4a9 Compare April 1, 2021 13:18
RaisinTen
RaisinTen reviewed Apr 1, 2021
View reviewed changes

@RaisinTen RaisinTen left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the PR. :)
Could you please address this review comment from a previous PR attempt to fix the related issue: #36458 (comment)?

I'm not sure this warrants its own section. Seems like it should go in the section of whatever call might result in requiring the unref() call. It would be good to incorporate it into an existing section, I think.

nit: I think the commit message should say Fixes instead of Ref (but that can be fixed while landing).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@AnupamaP

AnupamaP commented Apr 1, 2021

Copy link
Copy Markdown
Contributor Author

@RaisinTen - Thanks for the review!

Could you please address this review comment from a previous PR attempt to fix the related issue: #36458 (comment)?

I did incorporate the edits into an existing section instead of making a new section i.e. readline.createInterface(options) section. Am I missing something else?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@RaisinTen

RaisinTen commented Apr 1, 2021

Copy link
Copy Markdown
Member

The wait on the readable stream can also be ended by these calls:

readable.destroy();
readable.pause();
readable.unshift(null);

Should we also document these here?
IMO adding docs for these here seems a little out of place as they are already documented at https://nodejs.org/api/stream.html#stream_class_stream_readable. I think it would be more appropriate if we could mention this group of calls which can end the wait on the readable stream in the readable stream docs itself instead of everywhere an instance of the Readable class is used.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AnupamaP

AnupamaP commented Apr 1, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@RaisinTen Sure, we could do it in both places (readable and readline). Do you think it makes sense to add the following in the readable section? I can make that change

The wait on the readable stream can also be ended by these calls:
readable.destroy();
readable.pause();
readable.unshift(null);

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 reviewed Apr 1, 2021
View reviewed changes
Comment thread doc/api/readline.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@AnupamaP
AnupamaP force-pushed the readline-doc-edit branch from baedee8 to 33a1f72 Compare April 1, 2021 18:34
@aduh95

aduh95 commented Apr 1, 2021

Copy link
Copy Markdown
Contributor

The wait on the readable stream can also be ended by these calls:
Should we also document these here?

FWIW I don't think it's necessary: I think it's irrelevant to a user trying to interface with stdin that there are several ways to "make the program not hang". We don't have to be thorough on how the stream API work in the readline API documentation.

AnupamaP reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 reviewed Apr 1, 2021
View reviewed changes
Comment thread doc/api/readline.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread doc/api/readline.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread doc/api/readline.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@AnupamaP
AnupamaP force-pushed the readline-doc-edit branch from 9542437 to 46e15e5 Compare April 1, 2021 21:08
aduh95
aduh95 reviewed Apr 1, 2021
View reviewed changes
Comment thread doc/api/readline.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread doc/api/readline.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 reviewed Apr 2, 2021
View reviewed changes
Comment thread doc/api/readline.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread doc/api/readline.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 approved these changes Apr 2, 2021
View reviewed changes
@aduh95 aduh95 added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Apr 2, 2021
RaisinTen
RaisinTen approved these changes Apr 3, 2021
View reviewed changes
@AnupamaP @aduh95
doc: document how to unref stdin when using readline.Interface
7980d7c
PR-URL: nodejs#38019
Fixes: nodejs#36154
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
@aduh95
aduh95 force-pushed the readline-doc-edit branch from ced82e4 to 7980d7c Compare April 3, 2021 17:55
@aduh95

aduh95 commented Apr 3, 2021

Copy link
Copy Markdown
Contributor

Landed in 7980d7c

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95
aduh95 merged commit 7980d7c into nodejs:master Apr 3, 2021
MylesBorins pushed a commit that referenced this pull request Apr 4, 2021
@AnupamaP @MylesBorins
doc: document how to unref stdin when using readline.Interface
7948766
PR-URL: #38019
Fixes: #36154
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Apr 4, 2021
v15.14.0 proposal #38084
Merged
MylesBorins pushed a commit that referenced this pull request Apr 5, 2021
@AnupamaP @MylesBorins
doc: document how to unref stdin when using readline.Interface
b40d35d
PR-URL: #38019
Fixes: #36154
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
targos pushed a commit that referenced this pull request May 1, 2021
@AnupamaP @targos
doc: document how to unref stdin when using readline.Interface
df54edc
PR-URL: #38019
Fixes: #36154
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
@danielleadams danielleadams mentioned this pull request May 3, 2021
v14.17.0 proposal #38507
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aduh95 aduh95 aduh95 approved these changes
@RaisinTen RaisinTen RaisinTen approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. doc Issues and PRs related to Node.js documentation. readline Issues and PRs related to the built-in readline module.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

How to unref readline?

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@AnupamaP @RaisinTen @aduh95 @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.