Function futures::executor::spawn
[−]
[src]
pub fn spawn<T>(obj: T) -> Spawn<T>
Spawns a new future, returning the fused future and task.
This function is the termination endpoint for running futures. This method
will conceptually allocate a new task to run the given object, which is
normally either a Future
or Stream
.
This function is similar to the thread::spawn
function but does not
attempt to run code in the background. The future will not make progress
until the methods on Spawn
are called in turn.