[−][src]Function stop_thread::kill_thread_exit_code
pub unsafe fn kill_thread_exit_code<T>(handle: JoinHandle<T>, exit_code: u32)
This is supported on Unix or Windows only.
Kills the thread, specifying the thread's exit code (if applicable).
Unix
Safety
Only kills the thread if it has enabled cancellation, then performs cleanup.
See man pthread_cancel
for more information.
Windows
Safety
Forcibly and immediately stops the thread, without any cleanup. See https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminatethread for more information.