Re: [streams] First draft at tee algorithms, for critique (#302)

> +  });
> +
> +  return [branch1, branch2];
> +
> +  function readAndEnqueueInBoth() {
> +    reader.read().then(
> +      ({ value, done }) => {
> +        if (done) {
> +          close1();
> +          close2();
> +          return;
> +        }
> +
> +        if (clone) {
> +          enqueue1(StructuredClone(value));
> +          enqueue2(StructuredClone(value));

need to look at canceled1 and canceled2 not to enqueue to a branche that is already cancelled

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/302/files#r26728413

Received on Thursday, 19 March 2015 03:56:23 UTC