GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — stream: writableNeedDrain by ronag · Pull Request #35348 · nodejs/node Conversation
|
|
Review requested:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Needs tests. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
8d1c665 to
deabf75
Compare
deabf75 to
3976f6a
Compare
Don't write to a stream which already has a full buffer. Fixes: nodejs#35341
3976f6a to
591616f
Compare
Fixes: #441 Refs: nodejs/node#35348 Refs: nodejs/node#35341
Fixes: #441 Refs: nodejs/node#35348 Refs: nodejs/node#35341
Fixes: #441 Refs: nodejs/node#35348 Refs: nodejs/node#35341
Fixes: #441 Refs: nodejs/node#35348 Refs: nodejs/node#35341
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
386afdf to
0811886
Compare
|
@nodejs/streams |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (dest.writableNeedDrain === true) { | ||
| if (state.flowing) { | ||
| src.pause(); | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm a little unsure how this affects the case where src is already piped to other destinations?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🤔 what about adding the stream to the state.awaitDrainWriters (refs pipeOnDrain + ondata(chunk)). Though that may require copying https://github.com/nodejs/node/pull/35348/files#diff-0117344ddd481d021ad96b9c8eea78a5R741-R747 from ondata...
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I have no idea how that works or what it is intended for.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Any chance this can be reverted or done some other way? It seems to cause issues with the source getting stuck in a paused state if you previously fed the output buffer with a lot of data, see eg, electron/asar#210 That module basically just appends a bunch of files to a single binary, but after a random amount of files it gets stuck due to the source being in a paused state.
This could, of course, be easily worked around by adding the writableNeedDrain loop as in the issue above, or adding a resume call to the stream, but I feel like that shouldn't really be necessary.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // Start the flow if it hasn't been started already. | ||
| if (!state.flowing) { | ||
|
|
||
| if (dest.writableNeedDrain === true) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nit: why not:
| if (dest.writableNeedDrain === true) { | |
| if (dest.writableNeedDrain) { |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (dest.writableNeedDrain === true) { | ||
| if (state.flowing) { | ||
| src.pause(); | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
🤔 what about adding the stream to the state.awaitDrainWriters (refs pipeOnDrain + ondata(chunk)). Though that may require copying https://github.com/nodejs/node/pull/35348/files#diff-0117344ddd481d021ad96b9c8eea78a5R741-R747 from ondata...
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Fixes: #441 Refs: nodejs/node#35348 Refs: nodejs/node#35341
|
@ronag is this ready to land? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in dd0f8f1 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Don't write to a stream which already has a full buffer. Fixes: #35341 PR-URL: #35348 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Don't write to a stream which already has a full buffer. Fixes: #35341 PR-URL: #35348 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
Fixes: #441 Refs: nodejs/node#35348 Refs: nodejs/node#35341
Fixes: #441 Refs: nodejs/node#35348 Refs: nodejs/node#35341
Fixes: #441 Refs: nodejs/node#35348 Refs: nodejs/node#35341
Don't write to a stream which already has a full buffer. Fixes: #35341 PR-URL: #35348 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
|
Adding don't land labels until #36544 is resolved. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This requires bug fix in #36563 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Don't write to a stream which already has a full buffer. Fixes: #35341 PR-URL: #35348 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
streams: Writable exposeneedDrain
There was an error while loading. Please reload this page.