Skip to content
Snippets Groups Projects
Commit 3b336cbd authored by lrn@google.com's avatar lrn@google.com
Browse files

Change singleSubscription/multiSubscription to normal/broadcast.

Also make StreamController not a Stream.

Review URL: https://codereview.chromium.org//12049013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@17563 260f80e4-7a28-3924-810f-c04153c831b5
parent 37351c48
No related branches found
No related tags found
No related merge requests found
......@@ -233,9 +233,9 @@ class _ErrorGroupStream extends Stream {
/// Creates a new [_ErrorGroupFuture] that's a child of [_group] and wraps
/// [inner].
_ErrorGroupStream(this._group, Stream inner)
: _controller = inner.isSingleSubscription ?
new StreamController() :
new StreamController.multiSubscription() {
: _controller = inner.isBroadcast ?
new StreamController.broadcast() :
new StreamController() {
_subscription = inner.listen(_controller.add,
onError: (e) => _group._signalError(e),
onDone: () {
......
......@@ -202,7 +202,7 @@ main() {
setUp(() {
errorGroup = new ErrorGroup();
controller = new StreamController.multiSubscription();
controller = new StreamController.broadcast();
stream = errorGroup.registerStream(controller.stream);
});
......@@ -341,8 +341,8 @@ main() {
setUp(() {
errorGroup = new ErrorGroup();
controller1 = new StreamController.multiSubscription();
controller2 = new StreamController.multiSubscription();
controller1 = new StreamController.broadcast();
controller2 = new StreamController.broadcast();
stream1 = errorGroup.registerStream(controller1.stream);
stream2 = errorGroup.registerStream(controller2.stream);
});
......@@ -396,7 +396,7 @@ main() {
setUp(() {
errorGroup = new ErrorGroup();
controller = new StreamController.multiSubscription();
controller = new StreamController.broadcast();
stream = errorGroup.registerStream(controller.stream);
completer = new Completer();
future = errorGroup.registerFuture(completer.future);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment