pub fn spawn_worker_thread<F, R>(
name: &str,
f: F,
cond: Cond,
outcome: WaitOutcome,
) -> Result<JoinHandle<R>>Expand description
Runs a worker thread. Will run the requested function, and afterwards notify the threads waiting on the condvar. Catches panics during execution and resumes the panics after triggering the condvar, so that the waiting thread is notified on panics.
§Returns
Returns the thread’s join handle. Calling .join() on it returns the result of executing
f(), as well as whether we were able to enable sandboxing.