pub trait Thread: Runnable {
// Required method
fn start(self) -> JoinHandle<Self::Output>;
}Expand description
An extension trait that provides a method to spawn a thread for a Runnable task.
Required Methods§
Sourcefn start(self) -> JoinHandle<Self::Output>
fn start(self) -> JoinHandle<Self::Output>
Spawns a new standard library thread to execute the run method.
Returns a JoinHandle that can be used to wait for the thread to finish
and extract its Output.