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

Unified Diff: sdk/lib/async/future.dart

Issue 11794043: Remove Signal class and use Future/.whenComplete instead. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comment updated. Created 7 years, 11 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 | « sdk/lib/async/async_sources.gypi ('k') | sdk/lib/async/future_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/future.dart
diff --git a/sdk/lib/async/future.dart b/sdk/lib/async/future.dart
index c787f79c1ea3d10fed0bd29304505fa3f397ed67..01e9e88597eb6b5dc518ee3ae61b6f4d08bdbf47 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -141,16 +141,24 @@ abstract class Completer<T> {
factory Completer() => new _CompleterImpl<T>();
- /** The future that will contain the value produced by this completer. */
+ /** The future that will contain the result provided to this completer. */
Future get future;
- /** Supply a value for [future]. */
- void complete(T value);
+ /**
+ * Completes [future] with the supplied values.
+ *
+ * All listeners on the future will be immediately informed about the value.
+ */
+ void complete([T value]);
/**
- * Indicate in [future] that an exception occured while trying to produce its
- * value. The argument [exception] should not be [:null:]. A [stackTrace]
- * object can be provided as well to give the user information about where
+ * Complete [future] with an error.
+ *
+ * Completing a future with an error indicates that an exception was thrown
+ * while trying to produce a value.
+ *
+ * The argument [exception] should not be [:null:]. A [stackTrace]
+ * object can be provided as well, to give the user information about where
* the error occurred. If omitted, it will be [:null:].
*/
void completeError(Object exception, [Object stackTrace]);
« no previous file with comments | « sdk/lib/async/async_sources.gypi ('k') | sdk/lib/async/future_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698