Struct std::thread::JoinHandle1.0.0 [−] [src]

pub struct JoinHandle<T>(_);

An owned permission to join on a thread (block on its termination).

A JoinHandle detaches the child thread when it is dropped.

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<T> JoinHandle<T>
[src]

fn thread(&self) -> &Thread

Extracts a handle to the underlying thread

fn join(self) -> Result<T>

Waits for the associated thread to finish.

If the child thread panics, Err is returned with the parameter given to panic.

Trait Implementations

impl<T> AsRawHandle for JoinHandle<T>
1.9.0
[src]

fn as_raw_handle(&self) -> RawHandle

Extracts the raw handle, without taking any ownership.

impl<T> IntoRawHandle for JoinHandle<T>
1.9.0
[src]

fn into_raw_handle(self) -> RawHandle

Consumes this object, returning the raw underlying handle. Read more