pub(crate) fn spawn_future<F>(future: F, stack_size: usize, name: Option<String>) -> TaskId
    where
        F: Future<Output = ()> + Send + 'static,
    {
        Self::with(|state| {
            let task_id = TaskId(state.tasks.len());
            let task = Task::from_future(future, stack_size, task_id, name);
            state.tasks.push(task);
            task_id
        })
    }
/// Spawn a new task for a future. This doesn't create a yield point; the caller should do that
/// if it wants to give the new task a chance to run immediately.
Spawn a new task for a future. This doesn't create a yield point; the caller should do that
if it wants to give the new task a chance to run immediately.
Spawn a new task for a future . This doesn ' t create a yield point ; the caller should do that if it wants to give the new task a chance to run immediately .
pub(crate) fn spawn_future<F>(future: F, stack_size: usize, name: Option<String>) -> TaskId
    where
        F: Future<Output = ()> + Send + 'static,
    {
        Self::with(|state| {
            let task_id = TaskId(state.tasks.len());
            let task = Task::from_future(future, stack_size, task_id, name);
            state.tasks.push(task);
            task_id
        })
    }
pub ( crate ) fn spawn_future < F > ( future : F , stack_size : usize , name : Option < String > ) -> TaskId where F : Future < Output = ( ) > + Send + ' static , { Self :: with ( | state | { let task_id = TaskId ( state . tasks . len ( ) ) ; let task = Task :: from_future ( future , stack_size , task_id , name ) ; state . tasks . push ( task ) ; task_id } ) }
Spawn a new task for a future.
Spawn a new task for a future .
future
F
stack_size
usize
name
Option<String>
future
F
stack_size
usize
name
Option<String>