Originally posted by Ernest Friedman-Hill:
Note also that stop() is deprecated for a reason: it's dangerous. In particular, it doesn't guarantee that those caches will be flushed; changes made to the shared variable may thus never take effect.
stop() accomplishes the thread stop by forcing an unrolling of the stack via a ThreadDeath object. Unfortunately, if the thread is not ready for it, (and you can read that to mean anything you want) two dangerous things can happen. Synchronization locks can be freed at locations where it is not acceptable. Data variables may be left in a state that is not expected to happen, due to an unexpected exit.
This can lead to data corruption, unexpected states / conditions, deadlock, etc.
Henry