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 |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 } | 773 } |
774 | 774 |
775 void _sendDone() { | 775 void _sendDone() { |
776 _subscription._close(); | 776 _subscription._close(); |
777 } | 777 } |
778 } | 778 } |
779 | 779 |
780 abstract class _AsyncStreamControllerDispatch<T> | 780 abstract class _AsyncStreamControllerDispatch<T> |
781 implements _StreamController<T> { | 781 implements _StreamController<T> { |
782 void _sendData(T data) { | 782 void _sendData(T data) { |
783 _subscription._addPending(new _DelayedData<dynamic /*=T*/>(data)); | 783 _subscription._addPending(new _DelayedData<T>(data)); |
784 } | 784 } |
785 | 785 |
786 void _sendError(Object error, StackTrace stackTrace) { | 786 void _sendError(Object error, StackTrace stackTrace) { |
787 _subscription._addPending(new _DelayedError(error, stackTrace)); | 787 _subscription._addPending(new _DelayedError(error, stackTrace)); |
788 } | 788 } |
789 | 789 |
790 void _sendDone() { | 790 void _sendDone() { |
791 _subscription._addPending(const _DelayedDone()); | 791 _subscription._addPending(const _DelayedDone()); |
792 } | 792 } |
793 } | 793 } |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 _StreamControllerAddStreamState(_StreamController<T> controller, | 939 _StreamControllerAddStreamState(_StreamController<T> controller, |
940 this.varData, | 940 this.varData, |
941 Stream source, | 941 Stream source, |
942 bool cancelOnError) | 942 bool cancelOnError) |
943 : super(controller, source, cancelOnError) { | 943 : super(controller, source, cancelOnError) { |
944 if (controller.isPaused) { | 944 if (controller.isPaused) { |
945 addSubscription.pause(); | 945 addSubscription.pause(); |
946 } | 946 } |
947 } | 947 } |
948 } | 948 } |
OLD | NEW |