-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
- Version: master
- Platform: all
- Subsystem: streams
Lines 304 to 315 in d37e59f
| // if it's past the high water mark, we can push in some more. | |
| // Also, if we have no data yet, we can stand some | |
| // more bytes. This is to work around cases where hwm=0, | |
| // such as the repl. Also, if the push() triggered a | |
| // readable event, and the user called read(largeNumber) such that | |
| // needReadable was set, then we ought to push more, so that another | |
| // 'readable' event will be triggered. | |
| function needMoreData(state) { | |
| return !state.ended && | |
| (state.length < state.highWaterMark || | |
| state.length === 0); | |
| } |
Specifically it states:
I think that comment is actually wrong. It says
if it's past the high water mark, we can push in some more.
However it has a check (simplified) as:
return state.length < state.highWaterMarkWhich will return true if we are below the watermark.
This would be a good issue for someone willing to learn more about streams.
Metadata
Metadata
Assignees
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.