Skip to main content

with_current_scope

Function with_current_scope 

Source
pub fn with_current_scope<R>(scope: &TaskScope, f: impl FnOnce() -> R) -> R
Expand description

Set the current TaskScope for the duration of f.

Set scope as the current scope for the duration of f, restoring the previous scope afterward.

Used by framework glue code so that bind functions can discover the owning scope via current_scope.