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

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

Issue 14028017: Remove .writeStream, .consume and rewrite IOSink to correctly implement a (sane) well-defined behav… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review comments. Created 7 years, 8 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 | « runtime/bin/socket_patch.dart ('k') | sdk/lib/async/timer.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 e163607208f159ac183e3193f06d38414a587090..34c884aa5609110c1b5939e6141e8385285135ee 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -237,9 +237,7 @@ abstract class Stream<T> {
* Binds this stream as the input of the provided [StreamConsumer].
*/
Future pipe(StreamConsumer<T> streamConsumer) {
- // TODO(floitsch): switch to:
- // streamConsumer.addStream(this).then((_) => streamConsumer.close());
- return streamConsumer.consume(this);
+ return streamConsumer.addStream(this).then((_) => streamConsumer.close());
}
/**
@@ -891,12 +889,6 @@ class _EventSinkView<T> extends EventSink<T> {
abstract class StreamConsumer<S> {
Future addStream(Stream<S> stream);
Future close();
-
-
- /**
- * Consume is deprecated. Use [addStream] followed by [close] instead.
- */
- Future consume(Stream<S> stream);
}
« no previous file with comments | « runtime/bin/socket_patch.dart ('k') | sdk/lib/async/timer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698