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

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

Issue 12154006: Remove Sink and move CollectionSink to async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/async/stream.dart
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index afdeaf3fa84f450b0f57081dda980874b5490c81..c713d9e87386f09989955e5bc5a08f1499141c88 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -215,13 +215,13 @@ abstract class Stream<T> {
}
// Deprecated method, previously called 'pipe', retained for compatibility.
- Future pipeInto(Sink<T> sink,
+ Future pipeInto(StreamSink<T> sink,
{void onError(AsyncError error),
ahe 2013/02/04 15:27:30 The argument onError is being ignored.
bool unsubscribeOnError}) {
_FutureImpl<T> result = new _FutureImpl<T>();
this.listen(
sink.add,
- onError: onError,
+ onError: sink.signalError,
onDone: () {
sink.close();
result._setValue(null);
@@ -847,7 +847,7 @@ abstract class StreamSubscription<T> {
/**
* An interface that abstracts sending events into a [Stream].
*/
-abstract class StreamSink<T> implements Sink<T> {
+abstract class StreamSink<T> {
void add(T event);
/** Signal an async error to the receivers of this sink's values. */
void signalError(AsyncError errorEvent);

Powered by Google App Engine
This is Rietveld 408576698