Skip to content
instance method

Thread#kill

() -> ::Thread?
thr.kill → thr

Terminates thr and schedules another thread to be run, returning the terminated Thread. If this is the main thread, or the last thread, exits the process. Note that the caller does not wait for the thread to terminate if the receiver is different from the currently running thread. The termination is asynchronous, and the thread can still run a small amount of ruby code before exiting.

See also .kill #keys #name #key? also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0