This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes stop a thread from running Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "stop a thread from running" Watch "stop a thread from running" New topic

stop a thread from running

Moya Green
Ranch Hand

Joined: Jan 24, 2002
Posts: 49
I am not quite sure about the following methods acting on threads, please correct me. Thank you!
which cannot directly stop a thread from executing?
1)call stop()//false
2)call wait() //false
3)call yield() // false
4)call notify() //true
5)call notifyAll() //true
6)call SetPriority //true
7)call start() on another Thread objeact //false
8)call read method on InoutStream object //false
9)exist from a synchronized block//true
Barkat Mardhani
Ranch Hand

Joined: Aug 05, 2002
Posts: 787
I think 7 and 8 are also true.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: stop a thread from running
It's not a secret anymore!