Trait pyo3_asyncio::generic::SpawnLocalExt [−][src]
pub trait SpawnLocalExt: Runtime { fn scope_local<F, R>(
event_loop: PyObject,
fut: F
) -> Pin<Box<dyn Future<Output = R>>>
where
F: Future<Output = R> + 'static; fn spawn_local<F>(fut: F) -> Self::JoinHandle
where
F: Future<Output = ()> + 'static; }
Expand description
Extension trait for async/await runtimes that support spawning local tasks
Required methods
Set the task local event loop for the given !Send future
fn spawn_local<F>(fut: F) -> Self::JoinHandle where
F: Future<Output = ()> + 'static,
fn spawn_local<F>(fut: F) -> Self::JoinHandle where
F: Future<Output = ()> + 'static,
Spawn a !Send future onto this runtime’s event loop