- From: Domenic Denicola <notifications@github.com>
- Date: Thu, 05 Feb 2015 09:57:51 -0800
- To: whatwg/streams <streams@noreply.github.com>
Received on Thursday, 5 February 2015 17:58:22 UTC
> @@ -159,6 +159,42 @@ export function IsReadableStream(x) {
> return true;
> }
>
> +export function PutBackIntoReadableStream(stream, chunk) {
> + if (stream._state === 'closed') {
> + throw new TypeError('stream is closed');
I think you're right. I'm not sure what the right solution would be though :(. Maybe, after reading the last chunk from the queue, delay for a turn before deciding to close the stream? That gives you a one-turn grace period.
---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/275/files#r24183243
Received on Thursday, 5 February 2015 17:58:22 UTC