Function spawn_owned

Source
pub fn spawn_owned<T: Send + 'static, F: FnOnce(Signal) -> T + Send + 'static>(
    thread_function: F,
) -> OwnedThread<T>
Expand description

The main function of this library.

It will create a new thread with a Signal that is controlled by the OwnedThread object it returns.

The thread_function that is passed to this thread is responsible for periodically checking the signal and to make sure it exits when the signal indicates that it should do so.