3 use std::{sync::Arc, future::Future, pin::Pin, task::{Context, Poll}};
6 let room_ref = Arc::new(Vec::new());
8 let gameloop_handle = spawn(async { //~ ERROR E0373
9 game_loop(Arc::clone(&room_ref))
11 gameloop_handle.await;
14 fn game_loop(v: Arc<Vec<usize>>) {}
16 fn spawn<F>(future: F) -> JoinHandle
18 F: Future + Send + 'static,
19 F::Output: Send + 'static,
26 impl Future for JoinHandle {
28 fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {