pub struct Thread<T: Send + 'static> { /* private fields */ }
Expand description

Handle on a thread returned by Builder::spawn.

Implementations

Waits for the associated thread to finish.

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

Similar to Thread::join but does not block forever.

Apply a transformation function when joining to the thread.

Signal the thread is should terminate as soon as possible.

NOTE: you should take precautions when implementing the thread body to periodiaclly check if it needs to terminate or not.

Add the thread to a Select set.

Completes a join operation that was started by the Select interface.

This method should be used if one of the select operations are used. If the ready familiy of methods is used, use one of the other join methods.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.