G
Guillaume Cottenceau
Hi,
Say the following code example:
backend = Thread.new {
puts "in backend"
system("sleep 50")
puts "done backend"
}
system("sleep 3")
Thread.kill(backend)
puts "killed backend"
system("sleep 20")
When this program "kills" the "backend" thread, the external process
is not terminated "immediately" (the "sleep 50").
Do any of you have any idea if it would be possible to kill the thread
"immediately"? I have a real-world program in which I have a very
costly external program I'd like to interrupt immediately, under some
circumstances.
Say the following code example:
backend = Thread.new {
puts "in backend"
system("sleep 50")
puts "done backend"
}
system("sleep 3")
Thread.kill(backend)
puts "killed backend"
system("sleep 20")
When this program "kills" the "backend" thread, the external process
is not terminated "immediately" (the "sleep 50").
Do any of you have any idea if it would be possible to kill the thread
"immediately"? I have a real-world program in which I have a very
costly external program I'd like to interrupt immediately, under some
circumstances.