Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Election can start more lazily
Browse files Browse the repository at this point in the history
akiradeveloper committed Nov 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 768c125 commit 3bdd606
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sorock/src/process/thread/election.rs
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ impl Thread {

fn do_loop(self) -> ThreadHandle {
let fut = async move {
let mut interval = tokio::time::interval(Duration::from_millis(300));
let mut interval = tokio::time::interval(Duration::from_secs(1));
loop {
interval.tick().await;
self.run_once().await.ok();
2 changes: 1 addition & 1 deletion sorock/src/process/thread/stepdown.rs
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ impl Thread {

pub fn do_loop(self) -> ThreadHandle {
let fut = async move {
let mut interval = tokio::time::interval(Duration::from_millis(300));
let mut interval = tokio::time::interval(Duration::from_secs(1));
loop {
interval.tick().await;
self.run_once().await.ok();

0 comments on commit 3bdd606

Please sign in to comment.