Skip to content

stream: eos more accurate writable and readable detection - #29409

Closed
ronag wants to merge 2 commits into
nodejs:masterfrom
nxtedition:eos-writable-readable
Closed

stream: eos more accurate writable and readable detection#29409
ronag wants to merge 2 commits into
nodejs:masterfrom
nxtedition:eos-writable-readable

Conversation

@ronag

@ronagronag commented Sep 2, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

The value of stream.readable and stream.writable should not
be used to detect whether a stream is Writable or Readable.
Refs: nodejs#29395
@ronag
ronagforce-pushed the eos-writable-readable branch from afe332c to 5b6e33aCompareSeptember 3, 2019 11:47
@Fishrock123

Copy link
Copy Markdown
Contributor

Might it be useful to publicly expose these?

@ronag

ronag commented Sep 5, 2019

Copy link
Copy Markdown
MemberAuthor

@Fishrock123: Something like?

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

@Fishrock123

Copy link
Copy Markdown
Contributor

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

@Fishrock123Fishrock123 added the stream Issues and PRs related to the stream subsystem. label Sep 6, 2019
@Trott

Trott commented Sep 7, 2019

Copy link
Copy Markdown
Member

@nodejs/streams

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ronag

Copy link
Copy Markdown
MemberAuthor

@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 <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott

Copy link
Copy Markdown
Member

Landed in 8709a40

@targos

Copy link
Copy Markdown
Member

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

ronag commented Sep 23, 2019

Copy link
Copy Markdown
MemberAuthor

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

@ronag

ronag commented Sep 23, 2019

Copy link
Copy Markdown
MemberAuthor

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

@MylesBorins

Copy link
Copy Markdown
Contributor

quick ping re: backport

@sxa

sxa commented Jan 13, 2020

Copy link
Copy Markdown
Member

@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 <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targostargos mentioned this pull request Jan 15, 2020
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 <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Feb 8, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streamIssues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@ronag@cclauss@Fishrock123@Trott@nodejs-github-bot@targos@MylesBorins@sxa@mcollina@jasnell