• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to stop an alive thread ?

 
Zhou Can
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As we all know , Thread.stop() is a deprecated method . Sun's suggestion is to replace it with a control flag in method run() . But my question is how to stop a thread without this control flag . Just means which un-deprecated method can replace the stop method .
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's wrong with using a control flag?
Eugene.
 
Forget Steve. Look at this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!