| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // part of dart.async; | 5 part of dart.async; |
| 6 | 6 |
| 7 // ------------------------------------------------------------------- | 7 // ------------------------------------------------------------------- |
| 8 // Core Stream types | 8 // Core Stream types |
| 9 // ------------------------------------------------------------------- | 9 // ------------------------------------------------------------------- |
| 10 | 10 |
| 11 abstract class Stream<T> { | 11 abstract class Stream<T> { |
| 12 Stream(); | 12 Stream(); |
| 13 | 13 |
| 14 factory Stream.fromFuture(Future<T> future) { | 14 factory Stream.fromFuture(Future<T> future) { |
| 15 var controller = new StreamController<T>(); | 15 var controller = new StreamController<T>(); |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 sink.signalError(error); | 833 sink.signalError(error); |
| 834 } | 834 } |
| 835 | 835 |
| 836 /** | 836 /** |
| 837 * Handle an incoming done event. | 837 * Handle an incoming done event. |
| 838 */ | 838 */ |
| 839 void handleDone(StreamSink<T> sink) { | 839 void handleDone(StreamSink<T> sink) { |
| 840 sink.close(); | 840 sink.close(); |
| 841 } | 841 } |
| 842 } | 842 } |
| OLD | NEW |