• Post Reply Bookmark Topic Watch Topic
  • New Topic

Alive and Dead stage

 
Vladimir Kositsky
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!