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