Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: lib/core/future.dart

Issue 10948009: Revert 12494. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/core/expect.dart ('k') | lib/core/num.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/core/future.dart
===================================================================
--- lib/core/future.dart (revision 12500)
+++ lib/core/future.dart (working copy)
@@ -27,9 +27,10 @@
*
* Use a [Completer] to create and change the state of a [Future].
*/
-abstract class Future<T> {
+interface Future<T> default FutureImpl<T> {
+
/** A future whose value is immediately available. */
- factory Future.immediate(T value) => new FutureImpl<T>.immediate(value);
+ Future.immediate(T value);
/** The value provided. Throws an exception if [hasValue] is false. */
T get value;
@@ -157,9 +158,9 @@
* completer.completeException(exception);
*
*/
-abstract class Completer<T> {
+interface Completer<T> default CompleterImpl<T> {
- factory Completer() => new CompleterImpl<T>();
+ Completer();
/** The future that will contain the value produced by this completer. */
Future get future;
@@ -197,6 +198,7 @@
* example, waiting for a collection of Futures to complete).
*/
class Futures {
+
/**
* Returns a future which will complete once all the futures in a list are
* complete. If any of the futures in the list completes with an exception,
« no previous file with comments | « lib/core/expect.dart ('k') | lib/core/num.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698