Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Side by Side Diff: lib/src/concatenate_streams.dart

Issue 1648963002: Add reactive-inspired stream transformers: Base URL: https://github.com/dart-lang/async@master
Patch Set: Restructure failes and add more tests. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "dart:async";
6
7 /// Concatenates streams.
8 ///
9 /// The events of each stream in [streams] are emitted, one stream at a time
10 /// in iteration order. When the final stream in [streams] has been processed,
11 /// the returned stream closes.
12 ///
13 /// If the listener on the concatenated stream cancels early, later streams are
14 /// not listened to at all.
nweiz 2016/03/01 02:10:03 It may be worth mentioning that an iterator may be
Lasse Reichstein Nielsen 2016/03/01 16:51:16 Good point.
15 Stream concatenateStreams(Iterable<Stream> streams) async* {
nweiz 2016/03/01 02:10:03 I can buy having fatal errors in scan, because the
Lasse Reichstein Nielsen 2016/03/01 16:51:16 This will forward both value and error events to t
nweiz 2016/03/08 23:57:34 Oh, interesting. I was under the impression that a
16 for (var stream in streams) {
17 yield* stream;
18 }
19 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698