You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doc: clarify readable._read() and pipe() error behavior
- Rewrite readable._read() description to resolve contradictory
statements about when _read() is called relative to push(). The new
text clarifies that: push() may be called multiple times until it
returns false; _read() will not be called again until push() provides
non-empty data; and if data is not immediately available, push()
should be called asynchronously when data arrives.
- Clarify pipe() error caveat to specify that when the source stream is
destroyed or emits an error, the destination is not closed
automatically. Recommend stream.pipeline() for automatic cleanup.
Verified against source:
- lib/internal/streams/readable.js: kReading flag set before _read(),
cleared in push(); maybeReadMore_ loops while kReading is unset
- pipe() only listens for 'error' on destination, not on source
Fixes: #42291Fixes: #45072Fixes: #46908
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments