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

Unified Diff: sdk/lib/_internal/pub/lib/src/io.dart

Issue 16125005: Make new StreamController be async by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: sdk/lib/_internal/pub/lib/src/io.dart
diff --git a/sdk/lib/_internal/pub/lib/src/io.dart b/sdk/lib/_internal/pub/lib/src/io.dart
index e9a13167539da2e8b797058d4c407224af1170b9..e9d803b3e2911bac1c09b3cfe2f85237a05ce53a 100644
--- a/sdk/lib/_internal/pub/lib/src/io.dart
+++ b/sdk/lib/_internal/pub/lib/src/io.dart
@@ -422,7 +422,7 @@ Future drainStream(Stream stream) {
/// will succeed when [EventSink] is closed or fail with any errors that occur
/// while writing.
Pair<EventSink, Future> consumerToSink(StreamConsumer consumer) {
- var controller = new StreamController();
+ var controller = new StreamController(sync: true);
var done = controller.stream.pipe(consumer);
return new Pair<EventSink, Future>(controller.sink, done);
}
@@ -739,7 +739,7 @@ ByteStream createTarGz(List contents, {baseDir}) {
contents.forEach((file) => buffer.write('$file\n'));
log.fine(buffer.toString());
- var controller = new StreamController<List<int>>();
+ var controller = new StreamController<List<int>>(sync: true);
if (baseDir == null) baseDir = path.current;
baseDir = path.absolute(baseDir);

Powered by Google App Engine
This is Rietveld 408576698