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

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

Issue 1777453002: Modernize the package's style. (Closed) Base URL: git@github.com:dart-lang/async.git@master
Patch Set: Created 4 years, 9 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
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library async.stream_splitter;
6
7 import 'dart:async'; 5 import 'dart:async';
8 6
9 import '../result.dart'; 7 import '../result.dart';
10 import 'future_group.dart'; 8 import 'future_group.dart';
11 9
12 /// A class that splits a single source stream into an arbitrary number of 10 /// A class that splits a single source stream into an arbitrary number of
13 /// (single-subscription) streams (called "branch") that emit the same events. 11 /// (single-subscription) streams (called "branch") that emit the same events.
14 /// 12 ///
15 /// Each branch will emit all the same values and errors as the source stream, 13 /// Each branch will emit all the same values and errors as the source stream,
16 /// regardless of which values have been emitted on other branches. This means 14 /// regardless of which values have been emitted on other branches. This means
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 201 }
204 202
205 /// Marks [_controllers] as done. 203 /// Marks [_controllers] as done.
206 void _onDone() { 204 void _onDone() {
207 _isDone = true; 205 _isDone = true;
208 for (var controller in _controllers) { 206 for (var controller in _controllers) {
209 _closeGroup.add(controller.close()); 207 _closeGroup.add(controller.close());
210 } 208 }
211 } 209 }
212 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698