Skip to main content

create_local

Function create_local 

pub fn create_local<F, S, M>(
    owner: &TaskThread,
    future: F,
    schedule: S,
    metadata: M,
    options: TaskOptions,
) -> RawResult<TaskParts<F::Output, M, LocalOutput>, BuildError<F, S, M>>
where F: Future + 'static, F::Output: 'static, S: Schedule, M: Send + Sync + 'static,
Expand description

在指定所属线程创建本地任务(Task),允许原值和输出不满足Send。 先建立合法清理责任;绑定线程不等于已被执行器(executor)接纳。