Re: [streams] Prototyping several changes for better support for reading bytes (#287)

Continued from https://github.com/whatwg/streams/issues/253#issuecomment-77001963

> From operationStream, I'd like to incorporate:
>
> - queue / stream separation

Does this affect public API (either for stream creators or users)?

I notice the new comments at the top of the file (which are extremely helpful) have slightly different underlying sink/source designs. Instead of being based on strategy they give more direct control---which is probably a good change. Is that part of queue / stream separation?

> - revised set of promises

These are interesting. To summarize:

- Readable stream:
  - `readable` which is fulfilled when the stream enters the readable state
  - `errored` which is fulfilled when the stream enters the errored state
  - No more `closed` (seems bad); no more `ready` (possibly can be replaced by above two)
  - How does this fit with the async pull() + sync read() idea?
- Writable stream:
  - Similar to above: `writable` and `errored`; no more `closed`
  - Also has `waitSpaceChange()` promise-returning method.

I am not sure these are an improvement, personally. What was the motivation?

> revised preconditions for getReader() / getWriter() and release()

The addition of the "locked" state is hopefully not too annoying. Prototyping will help confirm. But in general (I know I'm repeating myself, sorry) I am in favor of changing the preconditions in ways that make things more straightforward.


---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/287#issuecomment-77010838

Received on Tuesday, 3 March 2015 19:02:06 UTC