Skip to main content

spawn_ticker

Function spawn_ticker 

Source
pub fn spawn_ticker(
    interval: Duration,
    stop: StopToken,
    tick: impl FnMut() + Send + 'static,
) -> Result<JoinHandle<()>>
Expand description

Run tick every interval until stop is triggered. The first tick comes one interval after the spawn. The thread is named rk-ticker.