Function spawn::new_task_builder

source ·
pub fn new_task_builder<F, A, R>(func: F, argument: A) -> TaskBuilder<F, A, R>where
    A: Send + 'static,
    R: Send + 'static,
    F: FnOnce(A) -> R,
Expand description

Creates a builder for a new Task that starts at the given entry point function func and will be passed the given argument.

Note

The new task will not be spawned until TaskBuilder::spawn() is invoked. See the TaskBuilder documentation for more details.