pub fn join(
        self,
    ) -> Result<T, std::boxed::Box<(dyn std::any::Any + std::marker::Send + 'static)>> {
        if let Some(join_handle) = self.join_handle {
            join_handle.join()
        } else if let Some(f) = self.f {
            let output = f();
            Ok(output)
        } else {
            unreachable!();
        }
    }
Waits for the 'thread' to complete, properly if it's multithreaded, or
by direct execution if it's single-threaded.
packages/perseus-cli/src/thread.rs