From c6be3c582ddd9511466a714e07d5b2c8927bd2ca Mon Sep 17 00:00:00 2001 From: Akira Hayakawa Date: Tue, 5 Nov 2024 07:41:48 +0000 Subject: [PATCH] Channel length 0 is enough to notify drop --- sorock/src/backend/redb/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorock/src/backend/redb/mod.rs b/sorock/src/backend/redb/mod.rs index 23689349..11f51a1d 100644 --- a/sorock/src/backend/redb/mod.rs +++ b/sorock/src/backend/redb/mod.rs @@ -20,7 +20,7 @@ impl Backend { let db = Arc::new(redb); let (reaper, tx) = log::Reaper::new(db.clone()); - let (_kill_tx, kill_rx) = crossbeam::channel::bounded(1); + let (_kill_tx, kill_rx) = crossbeam::channel::bounded(0); std::thread::spawn(move || loop { if let Err(TryRecvError::Disconnected) = kill_rx.try_recv() { break;