Re: [whatwg/streams] TransformStream byte streams (#616)

I thought about it a bit more, and decided that talking about multiple controllers on a single object was just confusing.

Instead, what I think we should do is rename TransformStreamSource to TransformStreamDefaultSource, and similarly with TransformStreamSink. Then for readable byte streams we add have TransformStreamByteSource. The controller is a thin wrapper around the ReadableStream's controller.

I have a rough idea how the Source and Sink should communicate. The Sink calls a polymorphic method on the Source with a promise while will fulfill when the transform completes. That method returns a promise chained from the passed in promise which will fulfill when the Source is ready for more data.

This all falls apart if the name or arguments of the transform() method need to depend on the type of the ReadableStream.

-- 
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/616#issuecomment-262681705

Received on Thursday, 24 November 2016 03:22:47 UTC