Re: [streams] Operation stream (#287)

Now, queue and promises are separated.

See this file for ReadbleStream and WritableStream interface definition.
https://github.com/whatwg/streams/blob/operationStream/ThinStream.md

- Regarding locking, I aggressively disallowed all methods on inactive stream/reader/writer. This relieves us from the task to give them some possibly convenient (but maybe no one would use) semantics to them while inactive.
- Separated "operation" concept from the ReadableStream and WritableStream again. They now lives in OperationQueue library.
- Methods are grouped based on their purpose.
- Employed revealing constructor pattern.
- Added unstoppable push source example for demonstration.

----

I haven't demonstrated, but:

- I guess the new queue-free API can be used for the offline discussion regarding detaching @yutakahirano
- I guess WritableStream with ExclusiveStreamWriter can be used for defining async read interface. Beyond locking, written buffer is not taken over by the writer. If you return a promise (or OperationStatus) from write(), you can return the filled buffer to the user of the stream, not writer.
  - write() corresponds to async readInto()
  - ExclusiveStreamWriter corresponds to a reader infrastructure for the async readInto()


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

Received on Sunday, 1 March 2015 17:57:41 UTC