pub struct Scope<'a> { /* fields omitted */ }
Schedule code to be executed when exiting the scope.
This is akin to having a destructor on the stack, except that it is
guaranteed to be run. It is guaranteed that the function is called
after all the spawned threads are joined.
Create a scoped thread.
spawn
is similar to the spawn
function in Rust's standard library. The
difference is that this thread is scoped, meaning that it's guaranteed to terminate
before the current stack frame goes away, allowing you to reference the parent stack frame
directly. This is ensured by having the parent thread join on the child thread before the
scope exits.
Generates the base configuration for spawning a scoped thread, from which configuration
methods can be chained.
Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more