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

In regard to this:

```
const [branch1, branch2] = rs.tee();
branch1.cancel().then(/* what should happen here? (1) */);
branch2.cancel().catch(/* what should happen here? (2) */);
```

I think its important to make it work such that a library consuming a stream:

1) Cannot tell that the stream came from a tee().
2) Cannot tell if the stream is branch1 or branch2.
3) Can use the stream without side effect from the usage of the other branch.  (Outside of OOM behavior.)

So, from an interface point of view, I think this should work exactly how normal stream cancellation works.  If cancel() normally rejects() then it should reject.  If cancel() normally fulfills, then it should fulfill.

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

Received on Friday, 20 March 2015 14:23:51 UTC