pub fn interval_worker<S, F, R>(s: Arc<S>, period: Duration, fun: F) -> StopFn where
    S: Send + Sync + 'static,
    F: Fn(Arc<S>) -> R + Send + Sync + 'static,
    R: Future<Output = ()> + Send + Sync