deno_std
deno_std copied to clipboard
feat(streams): buffer pull only once data has been written
Currently, when a Buffer is read from, and no data was written, it will instantly close. This PR adds logic so that the buffer needs to be written to first before starting to read.
Required for #1985
i think this might not work; if later on you write after reading and the buf is empty while reading, it will just close.
Would adding a #closedBool help? Similar to #startedBool, but set when the writable stream is closed.
Closing because #1985 is now closed in favor of #4548.