-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to implement
Stream.fromIterator
more directly.
The current implementation uses a specialized version of the pending-event queue used by stream subscriptions to remember pending events. That makes the queue polymorphic, and slightly more complicated than necessary, and that again makes further refactorings of the Stream implementation harder. This change moves the logic from the specialized pending-queue into a simple function instead, so you only pay for it if you actually use `Stream.fromIterable`. Also allows `Stream.fromIterable` to be listened to more than once. (It uses `Stream.multi` for the general async+sync controller API, and it would cost extra code to make it only work once.) Change-Id: I44b2010225cd3d32c2bcdb8a315c94881331bdae Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248146 Reviewed-by: Nate Bosch <nbosch@google.com> Commit-Queue: Lasse Nielsen <lrn@google.com>
- Loading branch information
Showing
7 changed files
with
126 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.