Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to stop an alive thread ?  RSS feed

 
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!