Function crossbeam::scope [−][src]
Expand description
Create a new scope, for deferred destructors.
Scopes, in particular, support scoped thread spawning.
Examples
Creating and using a scope:
crossbeam::scope(|scope| {
scope.defer(|| println!("Exiting scope"));
scope.spawn(|| println!("Running child thread in scope"))
});
// Prints messages in the reverse order written