To reinforce what @Jon Skeet said, this is a REALLY BAD IDEA to call the deprecated Thread.stop() or Thread.destroy() methods.
According to javadoc, Thread.destroy() was fundamentally dangerous and was never implemented. The original idea was to simply kill the thread and break all of its monitor locks. If it were in the middle of updating the overall data structure, the data structure would remain in an undefined state. Other threads waiting for a killed thread to notify some object will wait forever.
Thread.stop() throws a ThreadDeath exception at an unexpected (to the affected code) location. This is a bit more streamlined than killing a stream, but if all the stopped threads (including everything that it causes) are carefully written by finally blocks to notify waiters, restore data structures, etc., you have the same problem.
See Java Primary Deprecation for the whole story.
Stephen c
source share