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

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

Issue 15999002: Add Stream.drain() method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | tests/lib/async/stream_controller_async_test.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 4be59b7326b09d1f0706db8ddf935b85f13c1097..1baaf014a4a463ff2e4774643f803a68304e8318 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -499,6 +499,12 @@ abstract class Stream<T> {
}
/**
+ * Discard all data on the stream, but signal when it's done or an error
+ * occoured.
floitsch 2013/05/24 11:50:42 Discards ... signals ... occured Add optional arg
Anders Johnsen 2013/05/24 12:45:03 Done.
+ */
+ Future drain() => listen(null).asFuture();
floitsch 2013/05/24 11:50:42 list(null, cancelOnError: true), documenting that
Anders Johnsen 2013/05/24 12:45:03 Done.
Søren Gjesse 2013/05/24 14:02:04 Should it maybe have a named optional argument "ig
floitsch 2013/05/24 16:21:33 I think that this should be kept as simple as poss
+
+ /**
* Provides at most the first [n] values of this stream.
*
* Forwards the first [n] data events of this stream, and all error
« no previous file with comments | « no previous file | tests/lib/async/stream_controller_async_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698