Re: [whatwg/streams] Allow web devs to synchronize branches with tee()? (#1157)

All right, here's my attempt: https://jsfiddle.net/MattiasBuelens/9gr3zq7b/7/

It's basically a re-implementation of [ReadableStreamDefaultTee](https://streams.spec.whatwg.org/#abstract-opdef-readablestreamdefaulttee), but with a modified pull algorithm that waits until both branches have called `pull()` before proceeding with the actual `reader.read()`.

Here's how that would work in [your initial example](https://jsfiddle.net/jib1/Lb097t1m/6/): https://jsfiddle.net/MattiasBuelens/y439ahnp/2/

-- 
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/1157#issuecomment-893769058

Received on Thursday, 5 August 2021 20:18:46 UTC