pub fn wait_thread(handle: &ThreadHandle) -> Result<i32, TaskError>Expand description
Waits for a thread to finish executing without consuming its owning handle.
This split wait operation lets handle registries keep their raw-pointer or map entry valid while the target still runs. Completion is published by the exiting thread after its entry function and exit code are final, before the non-returning scheduler exit. Physical off-CPU completion and final resource reclamation are separate phases.