Re: [streams] Support reading bytes into buffers allocated by user code on platforms where only async read is available (#253)

Oh. New question related to the { value, done } stuff and the multiple-read-calls point in the above.

What if you call read() five times feeding it five different views. But the stream closes after the first read?

The { value, done } design only has room for one view (unless we make it an array). What about the other three?

We could solve this by disallowing multiple calls to read() (also discussed above). That will prohibit you from feeding multiple views at once. Is that an important pattern to support, or no?

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/253#issuecomment-77463396

Received on Thursday, 5 March 2015 22:12:18 UTC