aspose file tools
The moose likes Threads and Synchronization and the fly likes Alive and Dead stage Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Alive and Dead stage" Watch "Alive and Dead stage" New topic
Author

Alive and Dead stage

Vladimir Kositsky
Ranch Hand

Joined: Nov 03, 2000
Posts: 116
Hi everybody,
whether yield() ar wait() can cause thread dead stage?
Question is result of my investigation about what is cousing thread death: according to avaliable documentation only two reasons
* return from run()
* exception in execution of thread
Cheers
Jerry Pulley
Ranch Hand

Joined: Sep 19, 2000
Posts: 221
Vladimir,
You're correct that a thread only dies after exiting <code>run()</code>. (Actually, an unhandled exception is just another reason for <code>run()</code> to exit, but that's just splitting hairs.) A question, though: When you say "thread death" are you just making a loose reference to the end of its lifetime, or are you referring to the <code>ThreadDeath</code> error?
Jerry
Vladimir Kositsky
Ranch Hand

Joined: Nov 03, 2000
Posts: 116
Thanks for reply!
I mean whether it possible in some specific conditions that thread that waiting, or yielding, or low priority thread that never have chance to run even after getting runnable stage because of busy CPU( IO threads - whatever), could die without running?
I suspect that i read that is possible on some virtual mashines.
[This message has been edited by Vladimir Kositsky (edited January 09, 2001).]
[This message has been edited by Vladimir Kositsky (edited January 09, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Alive and Dead stage
 
Similar Threads
Some questions
Restarting Thread
Problem with kathy sierra book
Y do u do this 2 ur posts
Q on Dan's Mock Exam - Thread