Struct thread_scoped::JoinGuard [] [src]

#[must_use = "thread will be immediately joined if `JoinGuard` is not used"]
pub struct JoinGuard<'a, T: Send + 'a> { /* fields omitted */ }

A RAII guard for that joins a scoped thread upon drop


JoinGuard will panic on join or drop if its owned thread panics


impl<'a, T: Send + 'a> JoinGuard<'a, T>

Provides the backing Thread object

Joins the guarded thread and returns its result


join() will panic if the owned thread panics

Trait Implementations

impl<'a, T: Send + 'a> Sync for JoinGuard<'a, T>

impl<T: Send + 'static> ScopedDetach for JoinGuard<'static, T>

Detaches a child thread from its guard Read more

impl<'a, T: Send + 'a> Drop for JoinGuard<'a, T>

A method called when the value goes out of scope. Read more