pub fn spawn<F>(f: F) -> JoinHandle<()> where
    F: FnOnce() + Send + 'static,