Function futures::executor::spawn_with_handle
[−]
[src]
pub fn spawn_with_handle<F>(f: F) -> SpawnWithHandle<F> where
F: Future + 'static + Send,
<F as Future>::Item: Send,
<F as Future>::Error: Send,
Spawn a task onto the default executor, yielding a
JoinHandle
to the spawned task.
This function returns a future that will spawn the given future as a task
onto the default executor. On completion, that future will yield a
JoinHandle
that can itself be used as a future
representing the completion of the spawned task.