Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 } | |
| OLD | NEW |