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

Unified Diff: sdk/lib/io/file_impl.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/io/directory_impl.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/file_impl.dart
diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
index 2392b38862eae0cd9d156fa46cfafaa7ce7aa4fd..53a0f504a8872d2ca6ed7c65f6660979ea43676b 100644
--- a/sdk/lib/io/file_impl.dart
+++ b/sdk/lib/io/file_impl.dart
@@ -47,7 +47,7 @@ class _FileStream extends Stream<List<int>> {
}
void _setupController() {
- _controller = new StreamController<List<int>>(
+ _controller = new StreamController<List<int>>(sync: true,
onListen: _start,
onPause: () => _paused = true,
onResume: _resume,
@@ -488,7 +488,7 @@ class _File implements File {
static List<String> _decodeLines(List<int> bytes, Encoding encoding) {
if (bytes.length == 0) return [];
var list = [];
- var controller = new StreamController();
+ var controller = new StreamController(sync: true);
controller.stream
.transform(new StringDecoder(encoding))
.transform(new LineTransformer())
« no previous file with comments | « sdk/lib/io/directory_impl.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698