Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Threads  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can u stop running Thread?
 
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a very common question. you should search JavaRanch and/or the Web for answers.

The quick answer is that you cannot forcibly stop one running thread from another. You must not use the method Thread.stop(), as it is seriously broken. You must design and implement a way for the threads to cooperate in a shut-down procedure. The aforementioned search will show you a variety of ways that can be achieved.
 
Wait for it ... wait .... wait .... NOW! Pafiffle! A perfect tiny ad!
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!