Re: [whatwg/streams] Readable byte stream must call pull after receiving new chunk (#877)

> Interestingly, since the high water mark is 256, the stream will keep calling `pull()` long after the test is done! Should this test really keep `pull()`ing so much?

If `pull()` doesn't `enqueue()` then it should not be called again until something else happens (eg. a `read()` or an `enqueue()`).

I think the correct behaviour may depend on what kind of reader is in use. If the stream is locked to a byob reader then we'd like to wait to see whether a buffer is provided to read into. For a default reader we just want to fill the queue ASAP. I assume this is the reason why the behaviour with a default reader is a little off.

@tschneidereit I know you have been looking at the byte stream code recently. What do you think?

-- 
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/issues/877#issuecomment-363999643

Received on Thursday, 8 February 2018 04:33:42 UTC