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

Issue 12224081: Change Future.delayed to take a Duration. (Closed)

Created:
7 years, 10 months ago by floitsch
Modified:
7 years, 10 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Change Future.delayed to take a Duration. Committed: https://code.google.com/p/dart/source/detail?r=18471

Patch Set 1 #

Patch Set 2 : rebase. #

Patch Set 3 : Remove const Duration(). #

Total comments: 6

Patch Set 4 : Addressed comments and made argument optional. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -12 lines) Patch
M pkg/oauth2/lib/src/utils.dart View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/async/future.dart View 1 2 3 1 chunk +17 lines, -7 lines 0 comments Download
M sdk/lib/core/duration.dart View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M tests/lib/async/future_test.dart View 1 2 3 2 chunks +11 lines, -1 line 0 comments Download
M tests/lib/async/slow_consumer_test.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M tests/lib/async/stream_from_iterable_test.dart View 1 chunk +4 lines, -1 line 0 comments Download
M tests/standalone/io/fuzz_support.dart View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
floitsch
7 years, 10 months ago (2013-02-11 20:53:09 UTC) #1
Sean Eagan
On 2013/02/11 20:53:09, floitsch wrote: Is there any reason not to to make the "value" ...
7 years, 10 months ago (2013-02-12 01:10:56 UTC) #2
Lasse Reichstein Nielsen
lgtm https://codereview.chromium.org/12224081/diff/8/sdk/lib/async/future.dart File sdk/lib/async/future.dart (right): https://codereview.chromium.org/12224081/diff/8/sdk/lib/async/future.dart#newcode142 sdk/lib/async/future.dart:142: * at the earliest in the next event-loop ...
7 years, 10 months ago (2013-02-12 14:53:10 UTC) #3
floitsch
7 years, 10 months ago (2013-02-13 19:27:30 UTC) #4
https://codereview.chromium.org/12224081/diff/8/sdk/lib/async/future.dart
File sdk/lib/async/future.dart (right):

https://codereview.chromium.org/12224081/diff/8/sdk/lib/async/future.dart#new...
sdk/lib/async/future.dart:142: * at the earliest in the next event-loop
iteration.
On 2013/02/12 14:53:10, Lasse Reichstein Nielsen wrote:
> at the earliest -> no sooner than

Done.

https://codereview.chromium.org/12224081/diff/8/sdk/lib/async/future.dart#new...
sdk/lib/async/future.dart:152: factory Future.delayed(var duration, T value()) {
On 2013/02/12 14:53:10, Lasse Reichstein Nielsen wrote:
> I'm not opposed to making value optional.
> I don't actually like the name "value". How about be "computation"?

Done.

https://codereview.chromium.org/12224081/diff/8/tests/standalone/io/fuzz_supp...
File tests/standalone/io/fuzz_support.dart (right):

https://codereview.chromium.org/12224081/diff/8/tests/standalone/io/fuzz_supp...
tests/standalone/io/fuzz_support.dart:52: return new Future.delayed(const
Duration(), f)
On 2013/02/12 14:53:10, Lasse Reichstein Nielsen wrote:
> I don't like "new Duration()". It's not obvious it's zero.
> Make a Duration.ZERO (or EMPTY) constant instead.

Done.

Powered by Google App Engine
This is Rietveld 408576698