Re: [whatwg/streams] Synchronous (or asynchronous) state probing on WritableStream (#463)

Interesting. What if we made `desiredSize` return `null` for errored streams? That seems more semantically correct to me, even if we do introduce `state`. (Maybe we should change that for readable stream controllers too?) I'm not sure about whether it should return `null` for closed streams, or just `0`. But I guess you can't become closed unless you called `writer.close()`, so it is less of a concern.

I'm OK with synchronously exposing `state` too. I just can't tell if if it's too much complexity, or the right amount of complexity. How do we envision people using it? Would the pipe algorithm use it? (Even though we are planning to make pipe not use the public API, it is a good indicator of what types of things are important for people operating on streams at a low level.)

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/463#issuecomment-223135117

Received on Wednesday, 1 June 2016 21:48:20 UTC