Skip to main content

spawn_sweeper

Function spawn_sweeper 

Source
pub fn spawn_sweeper(state: AppState) -> Sweeper
Expand description

Spawns the sweeper over state.

A zero AppState::wake_interval is the off switch: no task is spawned, and nothing on this server wakes a timer. The returned guard is inert in that case, so a caller holds it unconditionally.