Skip to main content

scope

Function scope 

Source
pub async fn scope<F: Future>(ctx: Arc<ExecutionContext>, fut: F) -> F::Output
Expand description

Run fut with ctx as the task-local ExecutionContext for the whole future. Concurrent executions each scope their own context, so their task-local reads (stop flag, exec_id, …) resolve independently.