stream: make stream/iter toWritable apply backpressure · nodejs/node@b44b865 · GitHub
Skip to content

Commit b44b865

Browse files
jasnelladuh95
authored andcommitted
stream: make stream/iter toWritable apply backpressure
Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode PR-URL: #66079 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 6299b09 commit b44b865

3 files changed

Lines changed: 26 additions & 15 deletions

File tree

‎doc/api/stream_iter.md‎

Lines changed: 3 additions & 3 deletions

‎lib/internal/streams/iter/classic.js‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
const {
1515
ArrayPrototypePush,
1616
FunctionPrototypeCall,
17-
NumberMAX_SAFE_INTEGER,
1817
Promise,
1918
PromisePrototypeThen,
2019
PromiseReject,
@@ -937,11 +936,6 @@ function toWritable(writer) {
937936

938937
const writableOptions = {
939938
__proto__: null,
940-
// Use MAX_SAFE_INTEGER to effectively disable the Writable's
941-
// internal buffering. The underlying stream/iter Writer has its
942-
// own backpressure handling; we want _write to be called
943-
// immediately so the Writer can manage flow control directly.
944-
highWaterMark: NumberMAX_SAFE_INTEGER,
945939
write: _write,
946940
final: _final,
947941
destroy: _destroy,

‎test/parallel/test-stream-iter-writable-from.js‎

Lines changed: 23 additions & 6 deletions

0 commit comments

Comments
 (0)