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

Issue 10517006: Adds a callback to Future that is invoked upon completion, whether success or failure. (Closed)

Created:
8 years, 6 months ago by sam.mccall
Modified:
8 years, 6 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Adds a callback to Future that is invoked upon completion, whether success or failure. I'm not totally happy with the method name (in an ideal world, I'd like to call this method then(), and have onSuccess and onFailure). But this should be backwards-compatible. Committed: https://code.google.com/p/dart/source/detail?r=8303

Patch Set 1 #

Total comments: 15

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+280 lines, -59 lines) Patch
M corelib/src/future.dart View 1 2 4 chunks +26 lines, -10 lines 1 comment Download
M corelib/src/implementation/future_implementation.dart View 1 5 chunks +61 lines, -38 lines 1 comment Download
M tests/corelib/future_test.dart View 1 7 chunks +193 lines, -11 lines 1 comment Download

Messages

Total messages: 9 (0 generated)
Jennifer Messerly
https://chromiumcodereview.appspot.com/10517006/diff/1/corelib/src/future.dart File corelib/src/future.dart (right): https://chromiumcodereview.appspot.com/10517006/diff/1/corelib/src/future.dart#newcode45 corelib/src/future.dart:45: * When this future is complete (either with a ...
8 years, 6 months ago (2012-06-04 20:11:16 UTC) #1
Bob Nystrom
Just to let you know, Siggy is on vacation until (I think?) next week. https://chromiumcodereview.appspot.com/10517006/diff/1/corelib/src/future.dart ...
8 years, 6 months ago (2012-06-04 20:20:39 UTC) #2
Jennifer Messerly
Oops, somehow this comment didn't get saved the first time. Resending. https://chromiumcodereview.appspot.com/10517006/diff/1/corelib/src/implementation/future_implementation.dart File corelib/src/implementation/future_implementation.dart (right): ...
8 years, 6 months ago (2012-06-04 20:22:27 UTC) #3
sam.mccall
Thanks! I'll add you guys as reviewers, if it's better to wait for Siggi to ...
8 years, 6 months ago (2012-06-04 21:35:56 UTC) #4
Jennifer Messerly
https://chromiumcodereview.appspot.com/10517006/diff/1/corelib/src/future.dart File corelib/src/future.dart (right): https://chromiumcodereview.appspot.com/10517006/diff/1/corelib/src/future.dart#newcode49 corelib/src/future.dart:49: void onComplete(void complete(Future<T> future)); On 2012/06/04 21:35:57, sam.mccall wrote: ...
8 years, 6 months ago (2012-06-04 22:12:49 UTC) #5
sam.mccall
Made the suggested changes and expanded the class doc. PTAL. (If this looks okay, it'd ...
8 years, 6 months ago (2012-06-05 11:59:02 UTC) #6
Jennifer Messerly
On 2012/06/05 11:59:02, sam.mccall wrote: > Made the suggested changes and expanded the class doc. ...
8 years, 6 months ago (2012-06-05 17:53:32 UTC) #7
Siggi Cherem (dart-lang)
Thanks Sam for the patch! LGTM with comments below. http://codereview.chromium.org/10517006/diff/11001/corelib/src/future.dart File corelib/src/future.dart (right): http://codereview.chromium.org/10517006/diff/11001/corelib/src/future.dart#newcode22 corelib/src/future.dart:22: ...
8 years, 6 months ago (2012-06-06 20:42:49 UTC) #8
sammccall
8 years, 6 months ago (2012-06-07 23:27:22 UTC) #9
This was already committed, a followup patch with the requested changes is at
http://codereview.chromium.org/10544063/

Powered by Google App Engine
This is Rietveld 408576698