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

doc: fix Writable.write callback description #31812

Closed
wants to merge 3 commits into from

Conversation

ronag
Copy link
Member

@ronag ronag commented Feb 15, 2020

Clarifies a userland invariant until a better
solution can be found.

Also moves a misplaced sentence from _write to
write.

Refs: #31756
Refs: #31765

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@ronag ronag added the stream Issues and PRs related to the stream subsystem. label Feb 15, 2020
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Feb 15, 2020
@ronag
Copy link
Member Author

ronag commented Feb 15, 2020

@nodejs/streams

Clarifies a userland invariant until a better
solution can be found.

Also moves a misplaced sentence from _write to
write.

Refs: nodejs#31756
Refs: nodejs#31765
@lpinca
Copy link
Member

lpinca commented Feb 15, 2020

I think this depends on #31317.

@ronag
Copy link
Member Author

ronag commented Feb 15, 2020

I think this depends on #31317.

How so? This is a timing issue related to when and how the _write callback is invoked by the user.

@lpinca
Copy link
Member

lpinca commented Feb 15, 2020

The callback method will always be called asynchronously

Perhaps I'm misunderstanding this? Note "always". Or does that mean that if the callback is called it will be called asynchronously?

@ronag
Copy link
Member Author

ronag commented Feb 15, 2020

Perhaps I'm misunderstanding this? Note "always". Or does that mean that if the callback is called it will be called asynchronously?

Ah now I see what you mean. That part was incorrectly written at _write() instead of write(). I just moved it to where it was intended. That was not the primary purpose of this PR.

And yes the "always" is a bit ambigious but I think the intention is that "is called it will be called asynchronously". Maybe removing "always" would amke it clearer?

doc/api/stream.md Outdated Show resolved Hide resolved
Co-Authored-By: Luigi Pinca <[email protected]>
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@ronag ronag added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 16, 2020
@ronag ronag requested a review from lpinca February 16, 2020 14:05
doc/api/stream.md Outdated Show resolved Hide resolved
Co-Authored-By: Luigi Pinca <[email protected]>
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

ronag added a commit that referenced this pull request Feb 18, 2020
Clarifies a userland invariant until a better
solution can be found.

Also moves a misplaced sentence from _write to
write.

Refs: #31756
Refs: #31765

PR-URL: #31812
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@ronag
Copy link
Member Author

ronag commented Feb 18, 2020

Landed in 7c524fb

@MylesBorins
Copy link
Contributor

This does not land cleanly on v13.x. Could you please open a backport PR if it should land on that branch

@lpinca
Copy link
Member

lpinca commented Mar 6, 2020

I think 75b30c6 must be backported first. Then this will land cleanly.

@lpinca
Copy link
Member

lpinca commented Mar 6, 2020

75b30c6 is semver-major, so this should not be backported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants