Re: [whatwg/streams] Align WritableStream structure with ReadableStream structure (#488)

>  
>      return this._closedPromise;
>    }
>  
> +  get desiredSize() {
> +    if (IsWritableStreamDefaultWriter(this) === false) {
> +      throw CreateWritableStreamDefaultWriterBrandCheckException('desiredSize');
> +    }
> +
> +    if (this._ownerWritableStream === undefined) {
> +      throw CreateWritableStreamDefaultWriterLockException('desiredSize');
> +    }
> +
> +    return WritableStreamDefaultWriterGetDesiredSize(this)
> +  }
> +
>    get ready() {

I guess we are somewhat re-debating (1) vs. (2) from #318. I guess I was thinking (2), but (1) is probably best. If we do (1) then I think you are right.

If we do (2) then waitForDesiredSize() is equivalent to waitForDesiredSize(HWM), i.e. queueSize <= 0. It waits for complete draining instead of just dipping below the HWM.

But yeah, let's do (1).

---
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/pull/488/files/dfa07172203b4c292cfb5a3fc88e821a1db7c3db#r73122013

Received on Tuesday, 2 August 2016 09:22:30 UTC