deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

feat(streams): buffer pull only once data has been written

Open crowlKats opened this issue 2 years ago • 2 comments

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

crowlKats avatar Dec 18 '23 10:12 crowlKats

i think this might not work; if later on you write after reading and the buf is empty while reading, it will just close.

crowlKats avatar Dec 18 '23 11:12 crowlKats

Would adding a #closedBool help? Similar to #startedBool, but set when the writable stream is closed.

bavoco avatar Jan 15 '24 11:01 bavoco

Closing because #1985 is now closed in favor of #4548.

iuioiua avatar Aug 06 '24 07:08 iuioiua