- From: Takeshi Yoshino <notifications@github.com>
- Date: Tue, 02 Aug 2016 02:09:32 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Message-ID: <whatwg/streams/pull/488/r73120306@github.com>
> > return this._closedPromise; > } > > + get desiredSize() { > + if (IsWritableStreamDefaultWriter(this) === false) { > + throw CreateWritableStreamDefaultWriterBrandCheckException('desiredSize'); > + } > + > + if (this._ownerWritableStream === undefined) { > + throw CreateWritableStreamDefaultWriterLockException('desiredSize'); > + } > + > + return WritableStreamDefaultWriterGetDesiredSize(this) > + } > + > get ready() { So, `waitForDesiredSize()` is equivalent to .. `waitForDesiredSize(1)`, and it would fulfill when the desired size becomes equal to or more than 1? waitForDesiredSizeChange() can be implemented by ``` const current = writer.desiredSize; writer.waitForDesiredSize(current + 1).then(...); ``` assuming there's no legitimate use of non integer values together with this waiting API. > desiredSize >= highWaterMark. nitpicking: you meant `HWM >= queueSize`? --- 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#r73120306
Received on Tuesday, 2 August 2016 09:10:06 UTC