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

Re: Domenic

> We could make enqueue() return a promise that isn't fulfilled until the corresponding read() is called. But I am not sure what the use case is.

Yes. I don't come up with any other use case except for implementation of byte source with buffer pool where enqueue() result would be used for getting ArrayBuffer back from the user code into the buffer pool. As it's rare that we're given something in sequence from API and respond to each of them, the readable operation stream is only useful when it's used for implementing underlying sink (the approach of using a pair of readable and writable connected with a queue for everything. which I've already abandoned).

I'm not convinced and less interested in operation stream. I'll just extract useful proposals from the branch and present to you.

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

Received on Wednesday, 4 March 2015 16:41:24 UTC