INNER CODE UNIT · Rust
eq
spacejam/sled · src/lib.rs:345
fn eq(&self, other: &Self) -> bool {
self.object_id == other.object_id
}
}
/// Stored on `Db` and `Tree` in an Arc, so that when the
/// last "high-level" struct is dropped, the flusher thread
/// is cleaned up.
struct ShutdownDropper<const LEAF_FANOUT: usize> {
shutdown_sender:
std::sync::Mutex<std::sync::mpsc::Sender<std::sync::mpsc::Sender<()>>>,
cache: std::sync::Mutex<object_cache::ObjectCache<LEAF_FANOUT>>,
}
impl<const LEAF_FANOUT: usize> Drop for ShutdownDropper<LEAF_FANOUT> {
fn drop(&mut self) {
let (tx, rx) = std::sync::mpsc::channel();
log::debug!("sending shutdown signal to flusher");