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

Panics

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

Methods

impl<'a, T: Send + 'a> JoinGuard<'a, T>
[src]

Provides the backing Thread object

Joins the guarded thread and returns its result

Panics

join() will panic if the owned thread panics

Trait Implementations

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

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

Detaches a child thread from its guard Read more

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

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