Function ntex_rt::spawn_fn [−][src]
pub fn spawn_fn<F, R>(f: F) -> JoinHandle<R::Output>ⓘwhereNotable traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = Result<T, JoinError>;
F: FnOnce() -> R + 'static,
R: Future + 'static,
Executes a future on the current thread. This does not create a new Arbiter or Arbiter address, it is simply a helper for executing futures on the current thread.
Panics
This function panics if ntex system is not running.