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

Issue 958123002: Adjust handling of timers: (Closed)

Created:
5 years, 10 months ago by Ivan Posva
Modified:
5 years, 9 months ago
Reviewers:
zra, Søren Gjesse
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Lasse Reichstein Nielsen
Visibility:
Public.

Description

Adjust handling of timers: - Every zero timer is enqueued individually in the event queue and handled in sequence with other events. - Non-zero timers and zero timers expire in order. Therefor a due zero timer will also fire all preceding non-zero timers to ensure this order. R=sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=44095

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -124 lines) Patch
M runtime/lib/isolate_patch.dart View 1 1 chunk +0 lines, -2 lines 0 comments Download
M runtime/lib/timer_impl.dart View 1 10 chunks +117 lines, -122 lines 4 comments Download

Messages

Total messages: 8 (1 generated)
Ivan Posva
5 years, 10 months ago (2015-02-26 17:29:40 UTC) #2
zra
https://codereview.chromium.org/958123002/diff/1/runtime/lib/timer_impl.dart File runtime/lib/timer_impl.dart (right): https://codereview.chromium.org/958123002/diff/1/runtime/lib/timer_impl.dart#newcode233 runtime/lib/timer_impl.dart:233: if (_firstZeroTimer == null) { Code like the following ...
5 years, 10 months ago (2015-02-26 19:04:35 UTC) #3
Ivan Posva
https://codereview.chromium.org/958123002/diff/1/runtime/lib/timer_impl.dart File runtime/lib/timer_impl.dart (right): https://codereview.chromium.org/958123002/diff/1/runtime/lib/timer_impl.dart#newcode233 runtime/lib/timer_impl.dart:233: if (_firstZeroTimer == null) { On 2015/02/26 19:04:35, zra ...
5 years, 9 months ago (2015-02-27 11:47:42 UTC) #4
Søren Gjesse
lgtm https://codereview.chromium.org/958123002/diff/20001/runtime/lib/timer_impl.dart File runtime/lib/timer_impl.dart (right): https://codereview.chromium.org/958123002/diff/20001/runtime/lib/timer_impl.dart#newcode371 runtime/lib/timer_impl.dart:371: // null. Extend this comment to say that ...
5 years, 9 months ago (2015-02-27 12:38:46 UTC) #5
Søren Gjesse
https://codereview.chromium.org/958123002/diff/20001/runtime/lib/timer_impl.dart File runtime/lib/timer_impl.dart (right): https://codereview.chromium.org/958123002/diff/20001/runtime/lib/timer_impl.dart#newcode122 runtime/lib/timer_impl.dart:122: static const _TIMEOUT_EVENT = null; Additional question: Why are ...
5 years, 9 months ago (2015-02-27 14:12:56 UTC) #6
Ivan Posva
Committed patchset #2 (id:20001) manually as r44095 (presubmit successful).
5 years, 9 months ago (2015-02-27 16:45:30 UTC) #7
Ivan Posva
5 years, 9 months ago (2015-03-03 04:51:53 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/958123002/diff/20001/runtime/lib/timer_impl.dart
File runtime/lib/timer_impl.dart (right):

https://codereview.chromium.org/958123002/diff/20001/runtime/lib/timer_impl.d...
runtime/lib/timer_impl.dart:122: static const _TIMEOUT_EVENT = null;
On 2015/02/27 14:12:56, Søren Gjesse wrote:
> Additional question: Why are you using 1 and null, instead of e.g. 0 and 1?

The external event handler is sending nulls for timeouts.

https://codereview.chromium.org/958123002/diff/20001/runtime/lib/timer_impl.d...
runtime/lib/timer_impl.dart:371: // null.
On 2015/02/27 12:38:46, Søren Gjesse wrote:
> Extend this comment to say that all zero timers stay in the list. So for zero
> timers the timers where callback is null are not necessarily zero timers
> canceled while processing timers.

Done.

Powered by Google App Engine
This is Rietveld 408576698