Use sync forwarders for `merge` (dart-lang/stream_transform#28)
Towards dart-lang/stream_transform#24
Also fix a bug where canceling the subscription on a broadcast stream
would cancel single-subscription streams merged in and not allow
subsequent listeners.
- Use sync StreamControllers
- If the first stream is a broadcast, also translate all merged streams
to broadcast so they can be canceled and relistened. Add a note to the
Doc comment warning that single-subscription streams merged into a
broadcast stream may never be canceled.
- Move onPause, onResume, and onCancel initialization inside onListen
callback - they don't need to exist before initialization.
- Only cancel input subscriptions if they aren't all done.
- Add test for onDone forwarding.
- Add test for canceling and relistening on broadcast streams.
3 files changed
tree: cc037353381db5ccd3416f3a21dd2fbe6d58389a
- pkgs/