There is also a long page explaining the deprecation of the stop() method
in the new JDK 1.2 documentation.  Just find the stop method in the Thread
documentation, and it will have a link to the information explaining a
workaround.

Jason

[EMAIL PROTECTED] wrote:

> There's a very embroiled discussion about this very same topic on the
> advanced-java list.
>
> Basically, instead of doing a while(true) you should probably be doing
> something more on the lines of while(!isInterrupted()) and then use
> interrupt()  instead of stop().
>
> This will not only allow termination but also graceful exit without
> corrupting any data structures.
>
> For a cogent discussion about why you should almost never use
> Thread.stop(), see Doug Lea's excellent page at
>
> http://gee.cs.oswego.edu/dl/cpj/cancel.html
>
> . . . Sean.

Reply via email to