Win a copy of The Business Blockchain this week in the Cloud forum!
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic