pub fn spawn_with_shutdown<F, R>(fun: F) -> impl Lifecyclewhere
    F: FnOnce(ShutdownSignal) -> R + Send + 'static,
    R: Future<Output = ()> + Send,