pub fn spawn_str_with_state<F, T>(name: &str, f: F) -> JoinHandle<T>where F: FnOnce(ThreadState) -> T + Send + 'static, T: Send + 'static,