I hope you all and especially Corey have the books
Q1. Is runnable same as "ready to run"?
The diagram1 from the
Java Tutorial gives the impression to me that "running" is not a state. It seems to be the just a stage after the start() method is invoked and the run() method has been called. A running thread is running till the run method returns.
This differes from what is depicted in diagram2 and diagram3.
I felt that running should not be a state. It should be just the stage after start when run() has started and has not returned. This way one can visualise that while a thread is "running" at some point it may be "non-runnable" because it is blocked(for join or I/O or lock) or waiting(for notification) or sleeping, at some point it may be excuting and at some point it is just frozen because some other thread is currently executing. Is there such a state when a thread is running but frozen( not blocked, waiting or sleeping and still not executing becuase some other thread is currently executing)
Q2)What do you think?
Based on the reply I will ask a few more questions.
Thanks.
[ June 23, 2004: Message edited by: Swamy Nathan ]