Struct std::thread::JoinHandleStable
[-] [+]
[src]
pub struct JoinHandle(_);
An owned permission to join on a thread (block on its termination).
Unlike a JoinGuard
, a JoinHandle
detaches the child thread
when it is dropped, rather than automatically joining on drop.
Due to platform restrictions, it is not possible to Clone
this
handle: the ability to join a child thread is a uniquely-owned
permission.
Methods
impl JoinHandle
fn thread(&self) -> &Thread
Extract a handle to the underlying thread
fn join(self) -> Result<()>
Wait for the associated thread to finish.
If the child thread panics, Err
is returned with the parameter given
to panic
.