Repository navigation
Documentation/Add 'close' events to fs.ReadStream, fs.WriteStream, etc per Issue #6484 #6499
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
Changes from 2 commits
9d48b5d
ff217a8
827dfcb
57aa9e6
439df4b
b2a0db1
bcc8bd2
8cdf720
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -572,6 +572,12 @@ Examples of writable streams include: | |
| * [TCP sockets][] | ||
| * [child process stdin][] | ||
| * [`process.stdout`][], [`process.stderr`][] | ||
|
|
||
| Event: 'close' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be prefixed with |
||
|
|
||
| Emitted when the stream and any of its underlying resources (a file descriptor, for example) have been closed. The event indicates that no more events will be emitted, and no further computation will occur. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does this differs from I will also move this block after
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hesitate to move the 'Event: 'close'' block to after the 'Event: 'end'' block because these events seem to be in alphabetical order for better user experience. The difference between 'close' and 'end' events:
|
||
|
|
||
| Not all streams will emit the 'close' event. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| #### Event: 'drain' | ||
|
|
||
|
|
||
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.
Maybe something more specific like "Emitted when the ReadStream's underlying file descriptor has been closed" and similarly for
WriteStream?