pub fn join_thread(thread_id: ThreadId) -> Result<usize, Error>
Waits for the given thread to terminate and returns the exit code from that thread.