File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes stopping a thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "stopping a thread" Watch "stopping a thread" New topic
Author

stopping a thread

kesava chaitanya
Ranch Hand

Joined: Aug 15, 2001
Posts: 140
hi

1)in the API stop method was deprecated ;How will u stop a thread?.;
2)wat is deadlock?
anybody write a simple exmple for stopping a thread
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

This is the recommended way to make a stoppable thread:

"Deadlock" is when one thread has locked object 1, and is waiting to lock object 2, while a second thread has locked object 2, and is waiting to lock object 1. The two threads will wait forever; this is called deadlock.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: stopping a thread