Re: [streams] Do writable streams need separate signals for write-success vs. write-accepted? (#316)

I think @kriskowal gave a decisive "yes" answer with [this tweet](https://twitter.com/kriskowal/status/587765438953590784). You need two separate signals for byte streams, at the very least:

- Backpressure
- This buffer has been consumed (e.g. "copied to the kernel buffer") so you can start reusing it.

For byte streams presumably `write()` would fulfill with (a new ArrayBuffer instance backed by) the original buffer.

More generally, it makes sense for the write() promise to be the one that signals "I am done reading from this object now, and you can modify it without fear of race conditions" even for object streams.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/316#issuecomment-92541923

Received on Tuesday, 14 April 2015 00:03:17 UTC