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

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

Issue 16125005: Make new StreamController be async by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments Created 7 years, 7 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/_internal/pub/test/error_group_test.dart ('k') | sdk/lib/async/stream_controller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « sdk/lib/_internal/pub/test/error_group_test.dart ('k') | sdk/lib/async/stream_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698