[concurrency-interest] Does "Thread.stop" do what is says it does?

Joshua Bloch jbloch at gmail.com
Fri Aug 5 12:37:58 EDT 2005


Ian,

On 8/5/05, Ian Griffiths <ian.griffiths at yellow-b.com> wrote:
> It seems to me that this discussion still leaves unanswered the central
> question:
> 
> - How can we stop a thread that has got out of control (infinite looping
> or other anti-social behavior)?

If you need absolute safety, kill the process (VM).  Nothing else is
guaranteed to work.  Merely using separate classloaders is not
sufficient.  It lowers the odds of a catastrophic failure, but does
not prevent one.  If you're willing to take chances, call Thread.stop
and hope for the best.  In the absence of isolates, I really don't
think there's a lot more to say about the topic.

            Josh



More information about the Concurrency-interest mailing list