Struct stoppable_thread::StoppableHandle [] [src]

pub struct StoppableHandle<T> { /* fields omitted */ }

A handle for a stoppable thread

The interface is similar to std::thread::JoinHandle<T>, supporting thread and join with the same signature.

Methods

impl<T> StoppableHandle<T>
[src]

Stop the thread

This will signal the thread to stop by setting the shared atomic stopped variable to True. The function will return immediately after, to wait for the thread to stop, use the returned JoinHandle<T> and wait().