Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Todd Lipcon,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/8130

to look at the new patch set (#2).

Change subject: periodic: add one-shot timers
......................................................................

periodic: add one-shot timers

One-shot timers will Stop() themselves after running a user task once.

Note: it's worth pointing out that if Callback() races with Snooze(), the
outcome is somewhat undefined. That is, there's no telling whether the
currently running callback will run the task or snooze it. The same holds
for one-shot timers, albeit more profoundly, as Callback() can also race
with Start(). To avoid this, Start() the one-shot timer from within the
task, or right after the task.

I also refactored one-shot and jitter percentage into a new options struct.

Change-Id: Ia4d9376172d66c92958071d5abbac63d751e41f3
---
M src/kudu/rpc/periodic-test.cc
M src/kudu/rpc/periodic.cc
M src/kudu/rpc/periodic.h
3 files changed, 134 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/30/8130/2
--
To view, visit http://gerrit.cloudera.org:8080/8130
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia4d9376172d66c92958071d5abbac63d751e41f3
Gerrit-Change-Number: 8130
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to