(tokio::spawn) borrowed value does not live long enough — argument requires that `sleepy` is borrowed for `'static`
问题 This MWE shows the use of tokio::spawn in for in loop. The commented code sleepy_futures.push(sleepy.sleep_n(2)); works fine, but does not run/poll the async function. Basically, I would like to run a bunch of async functions at the same time. I am happy to change the implementation of Sleepy or use another library/technique. pub struct Sleepy; impl Sleepy { pub async fn sleep_n(self: &Self, n: u64) -> String { sleep(Duration::from_secs(n)); "test".to_string() } } #[tokio::main(core_threads =