- From: Mattias Buelens <notifications@github.com>
- Date: Tue, 14 Sep 2021 14:54:26 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 14 September 2021 21:54:39 UTC
Yeah, that's also what I was thinking. If we consider HWM = 0 to be broken, we could special case it. I *think* we would only need to change a single abstract op: > WritableStreamDefaultControllerGetBackpressure(*controller*) performs the following steps: > > 1. Let *desiredSize* be ! WritableStreamDefaultControllerGetDesiredSize(*controller*). > 2. If *controller*.\[[strategyHWM]] is 0, > 1. Return true if *desiredSize* < 0, or false otherwise. > (This is effectively the same as checking if *controller*.\[[queueTotalSize]] > 0.) > 3. Otherwise, > 1. Return true if *desiredSize* ≤ 0, or false otherwise. Alternatively, if want zero-size chunks to *also* cause backpressure, we could change it to "if *controller*.\[[stream]].\[[writeRequests]] is not empty" or something. Still, not sure how I feel about this. Might be difficult to explain this behavior to developers. 🤷♂️ -- 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-919539726
Received on Tuesday, 14 September 2021 21:54:39 UTC