- From: Domenic Denicola <notifications@github.com>
- Date: Wed, 04 Feb 2015 12:44:35 -0800
- To: whatwg/streams <streams@noreply.github.com>
Received on Wednesday, 4 February 2015 20:45:06 UTC
> export function CloseReadableStream(stream) {
> - stream._state = 'closed';
> + if (stream._readableStreamReader !== undefined) {
> + if (stream._state === 'waiting') {
> + stream._readableStreamReader._resolveReadyPromise(undefined);
> + }
> +
> + // rs.ready() was pending because there was a reader.
> + stream._resolveReadyPromise(undefined);
I think there is (or if there isn't, should be) some duplicate code here with `releaseLock()`. Might be good to extract them out into a single abstract op?
---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/277/files#r24117672
Received on Wednesday, 4 February 2015 20:45:06 UTC