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

Unified Diff: sdk/lib/async/stream_controller.dart

Issue 11887016: Make StreamController's unnamed constructor create a single-sub stream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/async/stream.dart ('k') | sdk/lib/async/stream_pipe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/stream_controller.dart
diff --git a/sdk/lib/async/stream_controller.dart b/sdk/lib/async/stream_controller.dart
index cf49a17c85a2f27f88fccbcfc91b113db1287201..cc4d9e15de9397d030ebc267c9d3784006d2db80 100644
--- a/sdk/lib/async/stream_controller.dart
+++ b/sdk/lib/async/stream_controller.dart
@@ -42,7 +42,7 @@ class StreamController<T> extends Stream<T> implements StreamSink<T> {
/**
* A controller with a [stream] that supports multiple subscribers.
*/
- StreamController() {
+ StreamController.multiSubscription() {
_stream = new _MultiControllerStream<T>(onSubscriptionStateChange,
onPauseStateChange);
}
@@ -51,7 +51,7 @@ class StreamController<T> extends Stream<T> implements StreamSink<T> {
* The controller will buffer all incoming events until the subscriber is
* registered.
*/
- StreamController.singleSubscription() {
+ StreamController() {
_stream = new _SingleControllerStream<T>(onSubscriptionStateChange,
onPauseStateChange);
}
« no previous file with comments | « sdk/lib/async/stream.dart ('k') | sdk/lib/async/stream_pipe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698