I'm not too clear on what you're trying to do, but there's an excerpt from Doug
Lea's book that might help: http://gee.cs.oswego.edu/dl/cpj/cancel.html

Here's my take on cancellation: If you're the one writing the code that needs
to be cancelled, you should use the periodically-check-for-cancel mechanism he
suggests. If not, you can't, so Thread.stop() is the only alternative. I think
the only problem with calling stop() is that the objects used by that thread
might be left in an inconsistent state. However, if you're planning on throwing
those objects away anyway, it seems like this should be a safe operation.

--Alex

Reply via email to