Skip to content

Commit

Permalink
Channel length 0 is enough to notify drop
Browse files Browse the repository at this point in the history
  • Loading branch information
akiradeveloper committed Nov 5, 2024
1 parent b290787 commit c6be3c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sorock/src/backend/redb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c6be3c5

Please sign in to comment.