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

Unified Diff: sdk/lib/io/http_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/file_impl.dart ('k') | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 8cfb2a3c1cc5f7ffec5f2fe1deb2df9709a2fcc5..0a16be90a452f51db8d237f26f90b4a22a9b8cd2 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -560,7 +560,8 @@ class _HttpOutboundConsumer implements StreamConsumer {
_ensureController() {
if (_controller != null) return;
- _controller = new StreamController(onPause: () => _subscription.pause(),
+ _controller = new StreamController(sync: true,
+ onPause: () => _subscription.pause(),
onResume: () => _subscription.resume(),
onListen: () => _subscription.resume(),
onCancel: _cancel);
@@ -1929,7 +1930,7 @@ class _HttpServer extends Stream<HttpRequest> implements HttpServer {
// Set of currently connected clients.
final Set<_HttpConnection> _connections = new Set<_HttpConnection>();
final StreamController<HttpRequest> _controller
- = new StreamController<HttpRequest>();
+ = new StreamController<HttpRequest>(sync: true);
// TODO(ajohnsen): Use close queue?
}
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698