Index: sdk/lib/async/stream.dart |
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart |
index 07378b51c910d3fe2ee3f9cc65eb2d18241ccd95..43697ecc4ff4bd220422cddf605f09d3d0a869bd 100644 |
--- a/sdk/lib/async/stream.dart |
+++ b/sdk/lib/async/stream.dart |
@@ -62,7 +62,7 @@ abstract class Stream<T> { |
* data or error, and then close with a done-event. |
*/ |
factory Stream.fromFuture(Future<T> future) { |
- StreamController<T> controller = new StreamController<T>(); |
+ StreamController<T> controller = new StreamController<T>(sync: true); |
future.then((value) { |
controller.add(value); |
controller.close(); |
@@ -114,7 +114,7 @@ abstract class Stream<T> { |
}); |
} |
- controller = new StreamController<T>( |
+ controller = new StreamController<T>(sync: true, |
onListen: () { |
watch.start(); |
startPeriodicTimer(); |