aboutsummaryrefslogtreecommitdiff
path: root/src/block.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-19 21:33:38 +0000
committerAlex Auvolat <alex@adnab.me>2020-04-19 21:33:38 +0000
commit53cf4d1baaa994544c02ec12f4bea28598720aa8 (patch)
treefef3fc9538e28682b1f91a65f818b7095ef27a16 /src/block.rs
parentec7f9f07e21ca2771d348b84c6cb14eda64e501c (diff)
downloadgarage-53cf4d1baaa994544c02ec12f4bea28598720aa8.tar.gz
garage-53cf4d1baaa994544c02ec12f4bea28598720aa8.zip
Log which workers are doing what
Diffstat (limited to 'src/block.rs')
-rw-r--r--src/block.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/block.rs b/src/block.rs
index 11818fd8..81b111ce 100644
--- a/src/block.rs
+++ b/src/block.rs
@@ -107,11 +107,13 @@ impl BlockManager {
pub async fn spawn_background_worker(self: Arc<Self>) {
// Launch 2 simultaneous workers for background resync loop preprocessing
- for _i in 0..2usize {
+ for i in 0..2usize {
let bm2 = self.clone();
self.system
.background
- .spawn_worker(move |must_exit| bm2.resync_loop(must_exit))
+ .spawn_worker(format!("block resync worker {}", i), move |must_exit| {
+ bm2.resync_loop(must_exit)
+ })
.await;
}
}