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: add closed property #33990

Closed
wants to merge 2 commits into from
Closed

Conversation

ronag
Copy link
Member

@ronag ronag commented Jun 20, 2020

fs streams already have a closed property. This PR standardized
it and brings it inline with rest of streams.

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

fs streams already have a closed property. This PR standardized
it and brings it inline with rest of streams.
@ronag ronag requested review from mcollina and lpinca June 20, 2020 10:25
@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. stream Issues and PRs related to the stream subsystem. labels Jun 20, 2020
@ronag
Copy link
Member Author

ronag commented Jun 20, 2020

@nodejs/streams

@@ -199,7 +199,7 @@ const rangeFile = fixtures.path('x.txt');
file.on('error', common.mustCall());

process.on('exit', function() {
assert(!file.closed);
assert(file.closed);
Copy link
Member Author

Choose a reason for hiding this comment

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

brings this inline with autoDestroy enabled by default

@@ -271,7 +271,7 @@ if (!common.isWindows) {
file.on('error', common.mustCall());

process.on('exit', function() {
assert(!file.closed);
assert(file.closed);
Copy link
Member Author

Choose a reason for hiding this comment

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

brings this inline with autoDestroy enabled by default

@ronag
Copy link
Member Author

ronag commented Jun 20, 2020

Might want to consider making this semver-major due to the changes in fs. Not sure.

doc/api/stream.md Outdated Show resolved Hide resolved
doc/api/stream.md Outdated Show resolved Hide resolved
@ronag ronag added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 20, 2020
@ronag
Copy link
Member Author

ronag commented Jun 20, 2020

Needs a CI

@ronag ronag removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 20, 2020
@tniessen tniessen added the semver-minor PRs that contain new features and should be released in the next minor version. label Jun 20, 2020
@tniessen
Copy link
Member

At least semver-minor, I assume.

@ronag
Copy link
Member Author

ronag commented Jun 20, 2020

Giving this more thought... I'm actually a little unsure about this PR... when is closed actually useful? Might not be worth it to increase the api surface just because fs streams for some reason provide it.

@addaleax addaleax added the needs-ci PRs that need a full CI run. label Jun 20, 2020
@ronag
Copy link
Member Author

ronag commented Jun 21, 2020

Unless someone has further comments on what I wrote above I think I'm going to close this until we have a better reason to add this property.

@mcollina
Copy link
Member

I would close this.

@addaleax addaleax closed this Jun 21, 2020
@addaleax
Copy link
Member

Closing, we can always re-open if we want

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants