docs: clarify writableNeedDrain behavior and usage in streams#56419
docs: clarify writableNeedDrain behavior and usage in streams#56419oussamaBGZ wants to merge 1 commit into
Conversation
|
The problem in your example seems to be that the |
when its discarded the read stream is paused so technically we should not lost any data. |
No, you get the chunk, the chunk it not written ( |
Ahh ok thanks a lot, i added writable.write(chunk) before the pause func, the outpout file size was exactly the same. It was a bit tricky to notice hahaha maybe we could add a section in the docs to talk about situations like these |
|
Hello, I'm doing some backlog hygiene on all PRs related to networking and streaming modules. There hasn't been any activity here for quite a while so I'm going to mark it Thank you! |
|
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
This PR updates the documentation for the writableNeedDrain property in the streams module to clarify its behavior and guide developers on how to handle backpressure effectively.
Problem
Inconsistent handling of backpressure can lead to issues like incomplete data transfer.
For example: