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
posted
0
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
posted
0
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).]