aboutsummaryrefslogtreecommitdiff
path: root/src/table/merkle.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-12-14 15:25:29 +0100
committerAlex Auvolat <alex@adnab.me>2022-12-14 15:25:29 +0100
commitdfc131850a09e7ceacfa98315adbef156e07e9ca (patch)
treeb9684958e211e0dd0389c12a166c9d1af5e8b5f9 /src/table/merkle.rs
parentd4af27f920ce48a60f2073e98b17bdf963241686 (diff)
downloadgarage-dfc131850a09e7ceacfa98315adbef156e07e9ca.tar.gz
garage-dfc131850a09e7ceacfa98315adbef156e07e9ca.zip
Simplified and more aggressive worker exit logic
Diffstat (limited to 'src/table/merkle.rs')
-rw-r--r--src/table/merkle.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/table/merkle.rs b/src/table/merkle.rs
index 0fe7d2cb..736354fa 100644
--- a/src/table/merkle.rs
+++ b/src/table/merkle.rs
@@ -340,10 +340,7 @@ where
.unwrap()
}
- async fn wait_for_work(&mut self, must_exit: &watch::Receiver<bool>) -> WorkerState {
- if *must_exit.borrow() {
- return WorkerState::Done;
- }
+ async fn wait_for_work(&mut self) -> WorkerState {
select! {
_ = tokio::time::sleep(Duration::from_secs(60)) => (),
_ = self.0.data.merkle_todo_notify.notified() => (),