| 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..5a70e943bf1259bd6bd7acfe3c5d8be9c4230ba7 100644
|
| --- a/sdk/lib/async/stream_controller.dart
|
| +++ b/sdk/lib/async/stream_controller.dart
|
| @@ -382,6 +382,13 @@ abstract class _StreamController<T> implements StreamController<T>,
|
| return addState.addStreamFuture;
|
| }
|
|
|
| + /**
|
| + * Returns a future that is completed when the stream is done
|
| + * processing events.
|
| + *
|
| + * This happens either when the done event has been sent, or if the
|
| + * subscriber of a single-subscription stream is cancelled.
|
| + */
|
| Future get done => _ensureDoneFuture();
|
|
|
| Future _ensureDoneFuture() {
|
| @@ -408,15 +415,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].
|
| + * The first time a controller is closed, a "done" event is added to its
|
| + * stream.
|
| *
|
| * 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
|
| - * stream.
|
| + * After closing, no further events may be added using [add] or [addError].
|
| + *
|
| + * The returned future is completed when the done event has been delivered.
|
| */
|
| Future close() {
|
| if (isClosed) {
|
|
|