Struct crossbeam_utils::scoped::Scope [] [src]

pub struct Scope<'a> { /* fields omitted */ }

Methods

impl<'a> Scope<'a>
[src]

[src]

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.

[src]

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.

[src]

Generates the base configuration for spawning a scoped thread, from which configuration methods can be chained.

Trait Implementations

impl<'a> Debug for Scope<'a>
[src]

[src]

Formats the value using the given formatter.

impl<'a> Drop for Scope<'a>
[src]

[src]

Executes the destructor for this type. Read more