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

Issue 3003853002: Add ticks counter to Timer. (Closed)

Created:
3 years, 3 months ago by Lasse Reichstein Nielsen
Modified:
3 years, 3 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add ticks counter to Timer. Avoid VM scheduling multiple timer events if it gets delayed. This doesn't scale for processes that are suspended for extended amounts of time. R=floitsch@google.com Committed: https://github.com/dart-lang/sdk/commit/39c8f64ea3cc55d6d866a184a18f379b8b6fa3bf

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add tests. Make preamble handle timer overrun better (zero-timers won't starve delayed timers). #

Patch Set 3 : Address comments #

Patch Set 4 : Test that tick increments by more than one #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -6 lines) Patch
M pkg/dev_compiler/tool/input_sdk/private/isolate_helper.dart View 4 chunks +13 lines, -0 lines 0 comments Download
M pkg/dev_compiler/tool/input_sdk/private/preambles/d8.js View 1 3 chunks +11 lines, -2 lines 0 comments Download
M runtime/lib/timer_impl.dart View 3 chunks +15 lines, -0 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/isolate_helper.dart View 4 chunks +13 lines, -0 lines 0 comments Download
M sdk/lib/_internal/js_runtime/lib/preambles/d8.js View 1 5 chunks +12 lines, -4 lines 0 comments Download
M sdk/lib/async/timer.dart View 1 2 1 chunk +15 lines, -0 lines 1 comment Download
A tests/lib_2/async/periodic_timer2_test.dart View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
A tests/lib_2/async/periodic_timer3_test.dart View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
A tests/lib_2/async/periodic_timer4_test.dart View 1 2 3 1 chunk +49 lines, -0 lines 0 comments Download
M tests/lib_2/lib_2_dart2js.status View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Lasse Reichstein Nielsen
3 years, 3 months ago (2017-08-25 08:46:56 UTC) #2
floitsch
LGTM. Write a test that busy-loops until 2 timer durations have passed and then check ...
3 years, 3 months ago (2017-08-25 09:16:48 UTC) #3
Lasse Reichstein Nielsen
PTAL
3 years, 3 months ago (2017-08-28 09:44:23 UTC) #4
floitsch
LGTM.
3 years, 3 months ago (2017-08-28 10:54:08 UTC) #5
Lasse Reichstein Nielsen
Committed patchset #4 (id:60001) manually as 39c8f64ea3cc55d6d866a184a18f379b8b6fa3bf (presubmit successful).
3 years, 3 months ago (2017-08-28 10:57:50 UTC) #7
floitsch
3 years, 3 months ago (2017-09-21 23:06:46 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/3003853002/diff/60001/sdk/lib/async/timer.dart
File sdk/lib/async/timer.dart (right):

https://codereview.chromium.org/3003853002/diff/60001/sdk/lib/async/timer.dar...
sdk/lib/async/timer.dart:99: * The number of durations preceeding the most
recent timer event.
preceding

Powered by Google App Engine
This is Rietveld 408576698