Re: [whatwg/streams] Piping to writable streams with HWM 0? (#1158)

> I think it _may_ be sufficient to have a `readyWhenNotWriting` boolean as part of the strategy

I don't know if I'd want `readyWhenNotWriting` as part of the queuing strategy, I feel like it belongs to the underlying sink.
* If it were part of the strategy, we'd have to change the `ByteLengthQueuingStrategy` and `CountQueuingStrategy` classes too so you could set that property through their constructors.
* It'd be kind of weird to have a queuing strategy property that *only* applies to writable streams.

But if you have good arguments for adding it to the queuing strategy, I'm all ears. 🙂

> Or even just changing the ready condition from `queueSize < highWaterMark` to `queueSize <= highWaterMark`

That would mean a pipe operation would never fill *exactly* up to the HWM, you'd always go over the HWM, right? 🤔 

I'm still leaning towards a controller method like `controller.releaseBackpressure()`:
* When called, it sets an internal boolean `[[releaseBackpressure]]` flag to `true` and calls `WritableStreamUpdateBackpressure()` if needed.
* If `[[releaseBackpressure]]` is true, `WritableStreamDefaultControllerGetBackpressure` must return `false` (without checking `desizedSize`).
* When `WritableStreamDefaultControllerWrite` is called, `[[releaseBackpressure]]` is reset to `false`.

-- 
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/1158#issuecomment-919526343

Received on Tuesday, 14 September 2021 21:28:54 UTC