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

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

Issue 11794043: Remove Signal class and use Future/.whenComplete instead. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comment updated. 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
« no previous file with comments | « sdk/lib/async/signal.dart ('k') | sdk/lib/async/stream_controller.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 68e2588bbab43e4717b253c5116992817a0e4ed8..9b8c3736596c474679a3fbb159516494f1d7d671 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -153,19 +153,19 @@ abstract class Stream<T> {
}
// Deprecated method, previously called 'pipe', retained for compatibility.
- Signal pipeInto(Sink<T> sink,
+ Future pipeInto(Sink<T> sink,
{void onError(AsyncError error),
bool unsubscribeOnError}) {
- SignalCompleter completer = new SignalCompleter();
+ Completer completer = new Completer();
this.listen(
sink.add,
onError: onError,
onDone: () {
sink.close();
- completer.complete();
+ completer.complete(null);
},
unsubscribeOnError: unsubscribeOnError);
- return completer.signal;
+ return completer.future;
}
@@ -716,13 +716,13 @@ abstract class StreamSubscription<T> {
* Request that the stream pauses events until further notice.
*
* If [resumeSignal] is provided, the stream will undo the pause
- * when the signal completes.
+ * when the future completes in any way.
* A call to [resume] will also undo a pause.
*
* If the subscription is paused more than once, an equal number
* of resumes must be performed to resume the stream.
*/
- void pause([Signal resumeSignal]);
+ void pause([Future resumeSignal]);
/**
* Resume after a pause.
« no previous file with comments | « sdk/lib/async/signal.dart ('k') | sdk/lib/async/stream_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698