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

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

Issue 1296623004: Accept a computation that returns a Future for Future.delayed. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments. Created 5 years, 4 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 | « no previous file | tests/lib/async/future_constructor2_test.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 5d6a65009a4afae64ff5d150d7d8816bc876526f..30016f7acc8eabf180d49f0ba49f0f103a000be8 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -221,7 +221,7 @@ abstract class Future<T> {
* See also [Completer] for a way to create and complete a future at a
* later time that isn't necessarily after a known fixed duration.
*/
- factory Future.delayed(Duration duration, [T computation()]) {
+ factory Future.delayed(Duration duration, [computation()]) {
_Future result = new _Future<T>();
new Timer(duration, () {
try {
« no previous file with comments | « no previous file | tests/lib/async/future_constructor2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698