| 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 * A [Future] represents a delayed computation. It is used to obtain a not-yet | 8 * A [Future] represents a delayed computation. It is used to obtain a not-yet |
| 9 * available value, or error, sometime in the future. Receivers of a | 9 * available value, or error, sometime in the future. Receivers of a |
| 10 * [Future] can register callbacks that handle the value or error once it is | 10 * [Future] can register callbacks that handle the value or error once it is |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 * | 356 * |
| 357 * The argument [exception] should not be `null`. | 357 * The argument [exception] should not be `null`. |
| 358 * | 358 * |
| 359 * If [exception] is an [AsyncError], it is used directly as the error | 359 * If [exception] is an [AsyncError], it is used directly as the error |
| 360 * message sent to the future's listeners, and [stackTrace] is ignored. | 360 * message sent to the future's listeners, and [stackTrace] is ignored. |
| 361 * | 361 * |
| 362 * Otherwise the [exception] and an optional [stackTrace] is combined into an | 362 * Otherwise the [exception] and an optional [stackTrace] is combined into an |
| 363 * [AsyncError] and sent to this future's listeners. | 363 * [AsyncError] and sent to this future's listeners. |
| 364 */ | 364 */ |
| 365 void completeError(Object exception, [Object stackTrace]); | 365 void completeError(Object exception, [Object stackTrace]); |
| 366 |
| 367 /** |
| 368 * Whether the future has been completed. |
| 369 */ |
| 370 bool get isCompleted; |
| 366 } | 371 } |
| OLD | NEW |