Function ntex::rt::spawn_fn[][src]

pub fn spawn_fn<F, R>(f: F) -> JoinHandle<<R as Future>::Output>
Notable traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = Result<T, JoinError>;
where
    F: 'static + FnOnce() -> R,
    R: 'static + Future
Expand description

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.