Re: [streams] Merge ReadableByteStream into ReadableStream (#430)

>        },
>  
>        cancel() {
>          return fs.close(fd);
> -      }
> +      },
> +
> +      autoAllocateChunkSize: DEFAULT_CHUNK_SIZE
>      });

We can convert default-reader requests into BYOB, but as onreadable() may be still invoked while there's no outstanding read request, we need the code for accepting received data.

We can implement another kind of auto-allocation feature that is to allocate a buffer when HWM is non-zero. Then, while we're pulling from the network by setting the window to non-zero, we also have buffers ready to accept them to drain data from the kernel.

We can also choose not to drain data from the kernel while there's no outstanding read requests. But it doesn't match the original concept of the example?

---
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/430/files/0562267ac9415713151bf0a34ae090c0dfb37c1a..4ad2edc8af0c82da98914eea6bd5c899618d8ec5#r57444278

Received on Friday, 25 March 2016 13:40:15 UTC