Chromium Code Reviews| Index: sdk/lib/async/stream.dart |
| diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart |
| index 7da445168addd87af12387a9a5ce5eab2e39f13c..8c2c2e8fd404b6ca28bfaf7da1aead421a3067fa 100644 |
| --- a/sdk/lib/async/stream.dart |
| +++ b/sdk/lib/async/stream.dart |
| @@ -832,6 +832,20 @@ abstract class StreamSubscription<T> { |
| * Resume after a pause. |
| */ |
| void resume(); |
| + |
| + /** |
| + * Returns a future that handles the [onDone] and [onError] callbacks. |
| + * |
| + * This method *overwrites* the existing [onDone] and [onError] callbacks |
| + * with new ones that complete the returned future. |
| + * |
| + * In case of an error the subscription will automatically cancel (even |
| + * when it was listening with `unsubscribeOnError` set to `false`). |
|
Lasse Reichstein Nielsen
2013/04/15 10:19:15
"This also makes the subscription cancel on any er
floitsch
2013/04/15 12:16:37
If you change the onError handler it won't receive
|
| + * |
| + * In case of a `done` event the future completes with the given |
| + * [futureValue]. |
| + */ |
| + Future asFuture([var futureValue]); |
| } |