Use sync forwarders in buffer (dart-lang/stream_transform#31)
Towards dart-lang/stream_transform#24
Fixes a bug where the output would close too soon if there was a pending
trigger.
Fixes some bugs in the test.
Fixes a bug with canceling when values are broadcast but trigger is
single subscription.
Refactor for better readability
- Fix tests to pass the valuesType instead of the triggerType for both
streams.
- Refactor for more clear parallel structure between handlers for values
and triggers.
- Inline _collectToList
- Add booleans to track when streams are done rather than overload what
it means for their subscriptions to be null.
- Only return a Future from onCancel when there were streams open that
needed to be canceled. This means that some of the extra awaits in
tests need to be left in to properly forward errors closing stream.
- Pull the trigger canceling tests out of the loops since the behavior
depends on both stream types.
- Cancel rather than pause trigger subscription if we won't need it
again.
- Add tests that broadcast stream (from values) can be canceled and
relistened
- Set up onPause, onResume, and onCancel in onListen
3 files changed
tree: 5e56cb733bd1e9c70664286ae1a89e3fde0f8fe1
- pkgs/