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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 276 |
279 void complete(T value) { | 277 void complete(T value) { |
280 _futureImpl._setValue(value); | 278 _futureImpl._setValue(value); |
281 } | 279 } |
282 | 280 |
283 void completeException(Object exception, [Object stackTrace]) { | 281 void completeException(Object exception, [Object stackTrace]) { |
284 _futureImpl._setException(exception, stackTrace); | 282 _futureImpl._setException(exception, stackTrace); |
285 } | 283 } |
286 } | 284 } |
287 | 285 |
OLD | NEW |