OLD | NEW |
1 // Copyright 2012 Google Inc. All Rights Reserved. | 1 // Copyright 2012 Google Inc. All Rights Reserved. |
2 // Dart core library. | 2 // Dart core library. |
3 | 3 |
4 part of dart.core; | |
5 | |
6 class _FutureImpl<T> implements Future<T> { | 4 class _FutureImpl<T> implements Future<T> { |
7 | 5 |
8 bool _isComplete = false; | 6 bool _isComplete = false; |
9 | 7 |
10 /** | 8 /** |
11 * Value that was provided to this Future by the Completer | 9 * Value that was provided to this Future by the Completer |
12 */ | 10 */ |
13 T _value; | 11 T _value; |
14 | 12 |
15 /** | 13 /** |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 | 280 |
283 void complete(T value) { | 281 void complete(T value) { |
284 _futureImpl._setValue(value); | 282 _futureImpl._setValue(value); |
285 } | 283 } |
286 | 284 |
287 void completeException(Object exception, [Object stackTrace]) { | 285 void completeException(Object exception, [Object stackTrace]) { |
288 _futureImpl._setException(exception, stackTrace); | 286 _futureImpl._setException(exception, stackTrace); |
289 } | 287 } |
290 } | 288 } |
291 | 289 |
OLD | NEW |