IntelliJ Java IDE
The moose likes Threads and Synchronization and the fly likes How to stop a thread Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "How to stop a thread" Watch "How to stop a thread" New topic
Author

How to stop a thread

Jim Baker
Ranch Hand

Joined: Mar 10, 2002
Posts: 177
The Thread.stop() method has been deprecated.
So how to stop a thread? Thanks.
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
I think you should use Thread.interrupt(). See the API for more details.


Java API Documentation
The Java Tutorial
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Moving to the Thread forum.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18652
As Layne said, follow the links in the API, which takes you here. See suggestions at end of page.


"I'm not back." - Bill Harding, Twister
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1158

Ask nicely....No seriously!
 
 
subject: How to stop a thread
 
Threads others viewed
Stopping Thread
Threads
Threads Question.
Stop a thread
Kill a thread
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture