How to kill a thread

suggest change

Call Thread.kill or Thread#terminate. Either one raises an exception in that thread immediately, so shared data can be left half-updated:

thr = Thread.new { perform_work }
Thread.kill(thr)

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents