The stop()
, suspend()
, and resume()
in java.lang.Thread
are deprecated because they are unsafe. The Oracle recommended w
All forms of concurrency control can be provided by the Java synchronization primitives by constructing more complex concurrency controls that suit your problem.
The reasons for deprecation are clearly given in the link you provide. If you're willing to accept the reasons why, then feel free to use those features.
However, if you choose to use those features, you also accept that support for those features could stop at any time.
Edit: I'll reiterate the reason for deprecation as well as how to avoid them.
Since the only danger is that objects that can be referenced by the stop
ed thread could be corrupted, simply clone
the String
before you pass it to the Thread
. If no shared objects exist, the threat of corrupted objects in the program outside the stop
ed Thread
is no longer there.