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

Side by Side Diff: sdk/lib/async/stream_controller.dart

Issue 2831913002: Fix typo. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of dart.async; 5 part of dart.async;
6 6
7 // ------------------------------------------------------------------- 7 // -------------------------------------------------------------------
8 // Controller for creating and adding events to a stream. 8 // Controller for creating and adding events to a stream.
9 // ------------------------------------------------------------------- 9 // -------------------------------------------------------------------
10 10
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 * on [Stream], and it must be used carefully to avoid doing so. 277 * on [Stream], and it must be used carefully to avoid doing so.
278 * 278 *
279 * The only advantage to using a [SynchronousStreamController] over a 279 * The only advantage to using a [SynchronousStreamController] over a
280 * normal [StreamController] is the improved latency. 280 * normal [StreamController] is the improved latency.
281 * Only use the synchronous version if the improvement is significant, 281 * Only use the synchronous version if the improvement is significant,
282 * and if its use is safe. Otherwise just use a normal stream controller, 282 * and if its use is safe. Otherwise just use a normal stream controller,
283 * which will always have the correct behavior for a [Stream], and won't 283 * which will always have the correct behavior for a [Stream], and won't
284 * accidentally break other code. 284 * accidentally break other code.
285 * 285 *
286 * Adding events to a synchronous controller should only happen as the 286 * Adding events to a synchronous controller should only happen as the
287 * very last part of a the handling of the original event. 287 * very last part of the handling of the original event.
288 * At that point, adding an event to the stream is equivalent to 288 * At that point, adding an event to the stream is equivalent to
289 * returning to the event loop and adding the event in the next microtask. 289 * returning to the event loop and adding the event in the next microtask.
290 * 290 *
291 * Each listener callback will be run as if it was a top-level event 291 * Each listener callback will be run as if it was a top-level event
292 * or microtask. This means that if it throws, the error will be reported as 292 * or microtask. This means that if it throws, the error will be reported as
293 * uncaught as soon as possible. 293 * uncaught as soon as possible.
294 * This is one reason to add the event as the last thing in the original event 294 * This is one reason to add the event as the last thing in the original event
295 * handler - any action done after adding the event will delay the report of 295 * handler - any action done after adding the event will delay the report of
296 * errors in the event listener callbacks. 296 * errors in the event listener callbacks.
297 * 297 *
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 var varData; 925 var varData;
926 926
927 _StreamControllerAddStreamState(_StreamController<T> controller, this.varData, 927 _StreamControllerAddStreamState(_StreamController<T> controller, this.varData,
928 Stream source, bool cancelOnError) 928 Stream source, bool cancelOnError)
929 : super(controller, source, cancelOnError) { 929 : super(controller, source, cancelOnError) {
930 if (controller.isPaused) { 930 if (controller.isPaused) {
931 addSubscription.pause(); 931 addSubscription.pause();
932 } 932 }
933 } 933 }
934 } 934 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698