Refactor block resync loop; make workers infaillible

This commit is contained in:
Alex Auvolat
2021-03-15 20:09:44 +01:00
parent 667e4e72a8
commit 4d4117f2b4
7 changed files with 49 additions and 47 deletions
+1 -2
View File
@@ -70,7 +70,7 @@ where
gc
}
async fn gc_loop(self: Arc<Self>, mut must_exit: watch::Receiver<bool>) -> Result<(), Error> {
async fn gc_loop(self: Arc<Self>, mut must_exit: watch::Receiver<bool>) {
while !*must_exit.borrow() {
match self.gc_loop_iter().await {
Ok(true) => {
@@ -89,7 +89,6 @@ where
_ = must_exit.recv().fuse() => (),
}
}
Ok(())
}
async fn gc_loop_iter(&self) -> Result<bool, Error> {