http://qs321.pair.com?node_id=451719


in reply to Threads: How to kill a thread manually?

You can't kill threads, on purpose -- it's horribly dangerous and pretty much guaranteed to corrupt internal state. Not good.

What you want is to have thread 1 check the state of thread 2 occasionally and cleanly exit when it's done. (Or, if you just want to completely kill the process, have thread 2 do a hard exit, but that'll not run DESTROY methods and such, which is probably not what you want)