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

stream: eos more accurate writable and readable detection #29409

Closed
wants to merge 2 commits into from

Conversation

ronag
Copy link
Member

@ronag ronag commented Sep 2, 2019

The value of stream.readable and stream.writable should not
be used to detect whether a stream is Writable or Readable.

Refs: #29395

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

@cclauss
Copy link
Contributor

cclauss commented Sep 2, 2019

The value of stream.readable and stream.writable should not
be used to detect whether a stream is Writable or Readable.

Refs: nodejs#29395
@Fishrock123
Copy link
Contributor

Might it be useful to publicly expose these?

@ronag
Copy link
Member Author

ronag commented Sep 5, 2019

@Fishrock123: Something like?

const { isReadable, isWritable } = require('stream');

@Fishrock123
Copy link
Contributor

@ronag Yes, although I'd like to hear others chime in on the stability of such functions.

@Fishrock123 Fishrock123 added the stream Issues and PRs related to the stream subsystem. label Sep 6, 2019
@Trott
Copy link
Member

Trott commented Sep 7, 2019

@nodejs/streams

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

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@ronag
Copy link
Member Author

ronag commented Sep 20, 2019

@Trott: This looks ready?

Trott pushed a commit that referenced this pull request Sep 22, 2019
The value of stream.readable and stream.writable should not
be used to detect whether a stream is Writable or Readable.

Refs: #29395
PR-URL: #29409
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott
Copy link
Member

Trott commented Sep 22, 2019

Landed in 8709a40

@targos
Copy link
Member

targos commented Sep 23, 2019

Should this be backported to v12.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

@ronag
Copy link
Member Author

ronag commented Sep 23, 2019

@targos: Never done it before but I will take a look. Will try to have something ready this week.

@ronag
Copy link
Member Author

ronag commented Sep 23, 2019

I'd very much like to have this merged and included in such a backport, #29664.

@MylesBorins
Copy link
Contributor

quick ping re: backport

@sxa
Copy link
Member

sxa commented Jan 13, 2020

@MylesBorins Coincidentally I started looking at backporting this one on Friday - PR ready now

sxa pushed a commit to sxa/node that referenced this pull request Jan 13, 2020
The value of stream.readable and stream.writable should not
be used to detect whether a stream is Writable or Readable.

PR-URL: nodejs#29409
Backport-PR-URL: nodejs#31345
targos pushed a commit that referenced this pull request Jan 14, 2020
The value of stream.readable and stream.writable should not
be used to detect whether a stream is Writable or Readable.

Refs: #29395
PR-URL: #29409
Backport-PR-URL: #31345
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BethGriggs pushed a commit that referenced this pull request Feb 6, 2020
The value of stream.readable and stream.writable should not
be used to detect whether a stream is Writable or Readable.

Refs: #29395
PR-URL: #29409
Backport-PR-URL: #31345
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants