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

Ian Griffiths ian.griffiths at yellow-b.com
Fri Aug 5 03:33:23 EDT 2005


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)?

I have the case with an application that we've written that runs code
provided by different departments (like applets) in separate classloaders.

As the different departments have varying IT, Java and testing skills,
we occasionally have this case. It is very annoying as the only solution
seems to be to stop a system running hundreds of users if the "Applet"
refuses to stop of its own accord.

I think all people in this situation are waiting impatiently for
Isolates. But is there any thing we can do until they come?

Ian

-----Original Message-----
From: "David Holmes" <dholmes at dltech.com.au>
To: "Dawid Kurzyniec" <dawidk at mathcs.emory.edu>,
<concurrency-interest at altair.cs.oswego.edu>
Cc: 
Date: Fri, 5 Aug 2005 11:39:09 +1000
Subject: ***SPAM*** Score/Req: 8.0/7.7 - RE: [concurrency-interest] Does
"Thread.stop" do what is says it does?

> Dawid,
> 
> > Replying to myself: the observed behavior seems to be that stop
> followed
> > by start does not cause immediate thread termination, so I guess I
> > report it here as a bug. (I guess it should be "if (this.getState()
> ==
> > TERMINATED) return;" or something equivalent).
> 
> There is a lot of history here and numerous bugs concerning the
> incorrect
> behaviour of "still born" threads - ones which have been stopped
> before they
> started. Back in 1.1 it worked as advertised, but there was a
> different bug
> whereby once stop() had been called then isAlive() returned false
> even
> though the thread was not terminated. In 1.2 if I recall correctly
> they
> fixed the isAlive problem, broke the still-born behaviour and
> deprecated the
> stop method. So thereafter any bug reports concerning this were
> flagged as
> "will not fix as it concerns a deprecated method". Not sure what bugs
> are
> still present in the bug parade.
> 
> In short you cannot rely on Thread.stop doing anything per its
> documentation
> these days.
> 
> David Holmes
> 
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest




More information about the Concurrency-interest mailing list