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

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: Remove usage of Sink from pub. Created 7 years, 10 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/async/collection_sink.dart ('k') | sdk/lib/core/core.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 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),
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);
« no previous file with comments | « sdk/lib/async/collection_sink.dart ('k') | sdk/lib/core/core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698