Struct std::thread::JoinGuardUnstable
[-]
[+]
[src]
pub struct JoinGuard<'a, T: 'a> {
// some fields omitted
}An RAII-style guard that will block until thread termination when dropped.
The type T is the return type for the thread's main function.
Methods
impl<'a, T: Send + 'a> JoinGuard<'a, T>
fn thread(&self) -> &Thread
Extract a handle to the thread this guard will join on.
fn join(self) -> Result<T>
Wait for the associated thread to finish, returning the result of the thread's calculation.
If the child thread panics, Err is returned with the parameter given
to panic.
impl<T: Send> JoinGuard<'static, T>
fn detach(self)
Detaches the child thread, allowing it to outlive its parent.