- From: Domenic Denicola <notifications@github.com>
- Date: Mon, 17 Aug 2020 10:20:39 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 17 August 2020 17:20:52 UTC
Hmm, or we could do something entirely on the Streams side. For example: ```js const controller = new AbortController(); readable1.pipeTo(writable, { preventAbort: true, signal: controller.signal }); // ... some time later ... controller.abort(); // Start the new pipe, when ready: readable2.pipeTo(writable, { waitForPrevious: true }); ``` with the same semantics. (That would require storing the previous pipe promise while it is not settled, but that seems OK.) I don't think we could make `waitForPrevious` the default; my intuition is that that would transform too many error cases into stalled cases. But maybe it'd work... -- 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/pull/1059#issuecomment-675006710
Received on Monday, 17 August 2020 17:20:52 UTC