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.