Skip to main content

scope

Function scope 

Source
pub fn scope<'env, F, T>(body: F) -> T
where F: for<'scope> FnOnce(RuntimeScope<'scope, 'env>) -> T,
Expand description

std::thread::scope whose spawned threads hold RUNTIME_STACK_SIZE.

std::thread::Scope::spawn always uses the default stack, so a scope from the standard library cannot hold this contract. This one can.