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

Side by Side Diff: lib/src/stream_sink_completer.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) 2016, the Dart project authors. Please see the AUTHORS file 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 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_sink_completer;
6
7 import 'dart:async'; 5 import 'dart:async';
8 6
9 import 'null_stream_sink.dart'; 7 import 'null_stream_sink.dart';
10 8
11 /// A [sink] where the destination is provided later. 9 /// A [sink] where the destination is provided later.
12 /// 10 ///
13 /// The [sink] is a normal sink that you can add events to to immediately, but 11 /// The [sink] is a normal sink that you can add events to to immediately, but
14 /// until [setDestinationSink] is called, the events will be buffered. 12 /// until [setDestinationSink] is called, the events will be buffered.
15 /// 13 ///
16 /// The same effect can be achieved by using a [StreamController] and adding it 14 /// The same effect can be achieved by using a [StreamController] and adding it
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 .catchError((_) {}); 169 .catchError((_) {});
172 } 170 }
173 171
174 // If the user has already asked when the sink is done, connect the sink's 172 // If the user has already asked when the sink is done, connect the sink's
175 // done callback to that completer. 173 // done callback to that completer.
176 if (_doneCompleter != null) { 174 if (_doneCompleter != null) {
177 _doneCompleter.complete(sink.done); 175 _doneCompleter.complete(sink.done);
178 } 176 }
179 } 177 }
180 } 178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698