Skip to main content

spawn_sweeper

Function spawn_sweeper 

Source
pub fn spawn_sweeper<H: ForkMaintenanceHost>(
    host: Arc<H>,
    interval: Duration,
    disable: bool,
    shutdown_rx: Receiver<()>,
) -> Option<JoinHandle<()>>
Expand description

Spawn the TTL sweeper task. Returns None (no task) when disable is set.

Holds the host (typically backed by a Weak<UniInner>) so the sweeper does not extend the database’s lifetime.