Function spawn_task
pub fn spawn_task<S, N, A, F, M>(
factory: &TaskFactory<S, N>,
access: A,
future: F,
delay: Duration,
config: TaskConfig<M>,
) -> RawResult<TaskHandle<TimedTaskNotifier<N, A>, F::Output, M>, SpawnError<F, TimedTaskNotifier<N, A>, M>>where
S: Schedule + Clone,
N: TaskNotifier,
A: TimerAccess,
F: Future + Send + 'static,
F::Output: Send + 'static,
M: Send + Sync + 'static,Expand description
原创建工厂持有者的定时派发支持;普通运行时不导出原工厂。 准备失败保原F/配置,来源明确拒绝保原待提交值及结果句柄(handle)。