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

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

Issue 301193010: Update documentation for "close". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add tests. Don't throw if listening on broadcast stream after close. Created 6 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
Index: sdk/lib/async/stream_controller.dart
diff --git a/sdk/lib/async/stream_controller.dart b/sdk/lib/async/stream_controller.dart
index 34582ae7a27603b74dcc2e17ccb64f2c1017593b..547ba9a266ea495ef2ebe093dc54f34d4f7d90b2 100644
--- a/sdk/lib/async/stream_controller.dart
+++ b/sdk/lib/async/stream_controller.dart
@@ -408,15 +408,17 @@ abstract class _StreamController<T> implements StreamController<T>,
}
/**
- * Closes this controller.
+ * Closes this controller and sends a done event on the stream.
*
* After closing, no further events may be added using [add] or [addError].
*
* You are allowed to close the controller more than once, but only the first
* call has any effect.
*
- * The first time a controller is closed, a "done" event is sent to its
+ * The first time a controller is closed, a "done" event is added to its
* stream.
+ *
+ * The returned future is completed when the done event has been delivered.
*/
Future close() {
if (isClosed) {

Powered by Google App Engine
This is Rietveld 408576698