Thread.kill(thread) â thread
Class Public methods
Causes the given thread to exit (see Thread::exit
).
count = 0 a = Thread.new { loop { count += 1 } } sleep(0.1) #=> 0 Thread.kill(a) #=> #<Thread:0x401b3d30 dead> count #=> 93947 a.alive? #=> false
Please login to continue.