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

Issue 2916693002: DetachFromSequence in Timer::Stop() (Closed)

Created:
3 years, 6 months ago by gab
Modified:
3 years, 6 months ago
Reviewers:
danakj, fdoray
CC:
chromium-reviews, danakj+watch_chromium.org, chirantan+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

DetachFromSequence in Timer::Stop() I was initially going to make Stop() always unconditionally AbandonScheduledTask() in Stop() @ https://codereview.chromium.org/2491613004/diff2/800001:820001/base/timer/timer.cc as it was the only way to ensure the task was abandoned on the running sequence. But I've since realized we could actually detach the sequence in Stop() so that the destructor may safely abandon the scheduled task. This is preferable as it avoids a potential task storm if any user repeatedly starts/stops the same timer in a burst... BUG=552633 Review-Url: https://codereview.chromium.org/2916693002 Cr-Commit-Position: refs/heads/master@{#477789} Committed: https://chromium.googlesource.com/chromium/src/+/e164e3ceab4dd13fb4e240e5d663e8ddb43b2a03

Patch Set 1 #

Total comments: 5

Patch Set 2 : comment nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -3 lines) Patch
M base/timer/timer.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M base/timer/timer.cc View 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 24 (15 generated)
gab
Hey Dana, in the last PS of https://codereview.chromium.org/2491613004/ I opted to forgo the new Stop/Abandon ...
3 years, 6 months ago (2017-06-01 16:29:49 UTC) #10
gab
daily ping, thanks!
3 years, 6 months ago (2017-06-02 17:05:10 UTC) #11
gab
+fdoray, looks like Dana is away, thanks!
3 years, 6 months ago (2017-06-05 18:12:13 UTC) #13
danakj
https://codereview.chromium.org/2916693002/diff/1/base/timer/timer.cc File base/timer/timer.cc (right): https://codereview.chromium.org/2916693002/diff/1/base/timer/timer.cc#newcode147 base/timer/timer.cc:147: // It's safe to destroy or restart Timer on ...
3 years, 6 months ago (2017-06-06 20:07:12 UTC) #14
gab
https://codereview.chromium.org/2916693002/diff/1/base/timer/timer.cc File base/timer/timer.cc (right): https://codereview.chromium.org/2916693002/diff/1/base/timer/timer.cc#newcode147 base/timer/timer.cc:147: // It's safe to destroy or restart Timer on ...
3 years, 6 months ago (2017-06-07 13:28:54 UTC) #15
danakj
LGTM
3 years, 6 months ago (2017-06-07 15:13:23 UTC) #16
gab
Thanks https://codereview.chromium.org/2916693002/diff/1/base/timer/timer.h File base/timer/timer.h (right): https://codereview.chromium.org/2916693002/diff/1/base/timer/timer.h#newcode207 base/timer/timer.h:207: // destroyed or even restarted on another sequence. ...
3 years, 6 months ago (2017-06-07 19:02:37 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2916693002/20001
3 years, 6 months ago (2017-06-07 19:03:42 UTC) #21
commit-bot: I haz the power
3 years, 6 months ago (2017-06-07 23:31:04 UTC) #24
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/e164e3ceab4dd13fb4e240e5d663...

Powered by Google App Engine
This is Rietveld 408576698