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

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

Issue 11794043: Remove Signal class and use Future/.whenComplete instead. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comment updated. Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/async/stream.dart ('k') | sdk/lib/async/stream_impl.dart » ('j') | 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 // Default implementation of a stream with a controller for adding 8 // Default implementation of a stream with a controller for adding
9 // events to the stream. 9 // events to the stream.
10 // ------------------------------------------------------------------- 10 // -------------------------------------------------------------------
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 /** Whether one or more active subscribers have requested a pause. */ 74 /** Whether one or more active subscribers have requested a pause. */
75 bool get isPaused => _stream._isPaused; 75 bool get isPaused => _stream._isPaused;
76 76
77 /** Whether there are currently any subscribers on this [Stream]. */ 77 /** Whether there are currently any subscribers on this [Stream]. */
78 bool get hasSubscribers => _stream._hasSubscribers; 78 bool get hasSubscribers => _stream._hasSubscribers;
79 79
80 /** 80 /**
81 * Send or queue a data event. 81 * Send or queue a data event.
82 */ 82 */
83 Signal add(T value) => _stream._add(value); 83 void add(T value) => _stream._add(value);
84 84
85 /** 85 /**
86 * Send or enqueue an error event. 86 * Send or enqueue an error event.
87 * 87 *
88 * If a subscription has requested to be unsubscribed on errors, 88 * If a subscription has requested to be unsubscribed on errors,
89 * it will be unsubscribed after receiving this event. 89 * it will be unsubscribed after receiving this event.
90 */ 90 */
91 void signalError(AsyncError error) { _stream._signalError(error); } 91 void signalError(AsyncError error) { _stream._signalError(error); }
92 92
93 /** 93 /**
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 _SingleControllerStream(this._subscriptionHandler, this._pauseHandler); 147 _SingleControllerStream(this._subscriptionHandler, this._pauseHandler);
148 148
149 void _onSubscriptionStateChange() { 149 void _onSubscriptionStateChange() {
150 _subscriptionHandler(); 150 _subscriptionHandler();
151 } 151 }
152 152
153 void _onPauseStateChange() { 153 void _onPauseStateChange() {
154 _pauseHandler(); 154 _pauseHandler();
155 } 155 }
156 } 156 }
OLDNEW
« no previous file with comments | « sdk/lib/async/stream.dart ('k') | sdk/lib/async/stream_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698