OLD | NEW |
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 |
11 /** | 11 /** |
12 * Type of a stream controller's `onListen`, `onPause` and `onResume` callbacks. | 12 * Type of a stream controller's `onListen`, `onPause` and `onResume` callbacks. |
13 */ | 13 */ |
14 typedef void ControllerCallback(); | 14 typedef void ControllerCallback(); |
15 | 15 |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 var varData; | 964 var varData; |
965 | 965 |
966 _StreamControllerAddStreamState(_StreamController<T> controller, this.varData, | 966 _StreamControllerAddStreamState(_StreamController<T> controller, this.varData, |
967 Stream source, bool cancelOnError) | 967 Stream source, bool cancelOnError) |
968 : super(controller, source, cancelOnError) { | 968 : super(controller, source, cancelOnError) { |
969 if (controller.isPaused) { | 969 if (controller.isPaused) { |
970 addSubscription.pause(); | 970 addSubscription.pause(); |
971 } | 971 } |
972 } | 972 } |
973 } | 973 } |
OLD | NEW |