Re: [whatwg/streams] Support teeing readable byte streams (#1114)

@MattiasBuelens commented on this pull request.



> @@ -2277,6 +2302,193 @@ create them does not matter.
  1. Return « |branch1|, |branch2| ».
 </div>
 
+<div algorithm>
+ <dfn abstract-op lt="ReadableByteStreamTee"
+ id="readable-byte-stream-tee">ReadableByteStreamTee(|stream|)</dfn>

Correct, both `ReadableByteStreamController.enqueue()` and `ReadableStreamBYOBRequest.respond()` transfer the buffer. So it's impossible to pass the same chunk to both branches, we *must* copy it first.

I'll try to write something for the domintro. 🙂

-- 
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/1114#discussion_r601876016

Received on Thursday, 25 March 2021 22:21:05 UTC