Re: [whatwg/streams] Reset for TransformStream (and WritableStream?) (#1026)

> One way forward would be if leaving `reset()` undefined on the transformer would just disable the reset functionality altogether.

It's not sufficient for one transform stream to support `reset()`. **All** transform streams in the pipe chain need to support it, otherwise we still have [the problem from my previous comment](https://github.com/whatwg/streams/issues/1026#issuecomment-580942977) where only a part of the chain gets reset.

That reminds me: `pipeTo()` would need to propagate resets from the readable end to the writable end, so we'd need to extend the reader and writer APIs as well. Sure, we could add `writer.reset()`, but how will that affect `reader.read()`? Not so trivial. 😅

> This seems to be sufficiently difficult and controversial that we won't get to it soon.

Agreed, let's not rush this. 👍

For now, developers can abort and re-create their pipe chain if they need to "reset" it. It's not pretty, but it works.

-- 
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/1026#issuecomment-581831720

Received on Tuesday, 4 February 2020 10:01:47 UTC