Function libp2p_rs::runtime::task::spawn [−][src]
pub fn spawn<F, T>(future: F) -> TaskHandle<T>ⓘwhereNotable traits for TaskHandle<T>
impl<T> Future for TaskHandle<T> type Output = Option<T>;
T: Send + 'static,
F: Future<Output = T> + Send + 'static,
Spawns a runtime.
The returned TaskHandle can be used to terminate and wait for its termination.
Note: the output of the future must be ().