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

> +  const branch2 = new ReadableStream({
> +    start(enqueue, close, error) {
> +      [enqueue2, close2, error2] = [enqueue, close, error];
> +    },
> +    pull: readAndEnqueueInBoth,
> +    cancel(reason) {
> +      canceled2 = true;
> +      cancelReason2 = reason;
> +      maybeCancelSource();
> +    }
> +  });
> +
> +  return [branch1, branch2];
> +
> +  function readAndEnqueueInBoth() {
> +    reader.read().then(

need to watch closed when there's no active read()?

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

Received on Thursday, 19 March 2015 03:57:13 UTC