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

Unified Diff: pkg/scheduled_test/lib/src/utils.dart

Issue 17490002: Make asBroadcastStream take two callbacks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reintroduce zone. Created 7 years, 6 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 | « pkg/logging/lib/logging.dart ('k') | samples/swarm/swarm_ui_lib/touch/Scroller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/lib/src/utils.dart
diff --git a/pkg/scheduled_test/lib/src/utils.dart b/pkg/scheduled_test/lib/src/utils.dart
index 31abe958e1dc94c0b21b2356087c135756b7c26b..7323e7f183abaf114eeece7ce2a9ccfc3e0900d2 100644
--- a/pkg/scheduled_test/lib/src/utils.dart
+++ b/pkg/scheduled_test/lib/src/utils.dart
@@ -137,10 +137,10 @@ typedef void StreamCanceller();
/// the wrapped stream. Unlike [StreamSubscription], this canceller will send a
/// "done" message to the wrapped stream.
Pair<Stream, StreamCanceller> streamWithCanceller(Stream stream) {
- var controller = new StreamController(sync: true);
- var controllerStream = stream.isBroadcast ?
- controller.stream.asBroadcastStream() :
- controller.stream;
+ var controller =
+ stream.isBroadcast ? new StreamController.broadcast(sync: true)
+ : new StreamController(sync: true);
+ var controllerStream = controller.stream;
var subscription = stream.listen((value) {
if (!controller.isClosed) controller.add(value);
}, onError: (error) {
« no previous file with comments | « pkg/logging/lib/logging.dart ('k') | samples/swarm/swarm_ui_lib/touch/Scroller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698