- From: Yutaka Hirano <notifications@github.com>
- Date: Wed, 14 Jan 2015 22:56:49 -0800
- To: whatwg/streams <streams@noreply.github.com>
- Message-ID: <whatwg/streams/pull/262/r22993414@github.com>
> @@ -558,8 +558,13 @@ Instances of <code>ReadableStream</code> are created with the internal slots des > </div> > > <ol> > - <li> If <b>this</b>@\[[reader]] is not <b>undefined</b>, return <b>this</b>@\[[reader]]@\[[lockReleased]]. > - <li> Return <b>this</b>@\[[readyPromise]]. > + <li> If <b>this</b>@\[[readableStreamReader]] is not <b>undefined</b>, return the result of transforming > + <b>this</b>@\[[readableStreamReader]]@\[[lockReleased]] by a fulfillment handler that returns <b>this</b>@\[[readyPromise]]. > + <li> Return the result of transforming <b>this</b>@\[[readyPromise]] by the following fulfillment handler: > + <ol> > + <li> If <b>this</b>@\[[readableStreamReader]] is <b>undefined</b>, return <b>undefined</b>. > + <li> Otherwise, return <b>this</b>@\[[readableStreamReader]]@\[[lockReleased]]. > + </ol> Oh, I see. I thought that introduces waiting -> waiting transition, but it is a harmless one, because some data are enqueued and a reader pulls all of them. Once I talked with @tyoshino about it and agreed we cannot avoid that kind of waiting -> waiting transition. Thank you! ``` // stream is not locked. stream.ready.then(() => console.log(stream.state)); reader = stream.getReader(); ... // Some items are enqueued, and reader pulls all of them. ... reader.releaseLock(); ``` --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/262/files#r22993414
Received on Thursday, 15 January 2015 06:57:16 UTC