hi all, Please have a look into this: What conditions might u use yield method thread class? 1)To call from current running thread to allow another thread of same priority to run. 2) to call on a waiting thread to allow it to run 3) To call on a waiting thread of higher priority to run. Answer given was 1.I think 1,2,3 are true.Because yield() meth is used to run other threads which are in wait mode. Regards Priya
Agree with Viji. Furhter, options 2 & 3 reference to 'waiting' threads. A waiting thead can be put into 'Ready to Run' State only by calling notify() or notyfyAll() methods of the Object, on which the waiting thread was having a lock before it went in to wait. Sorry, the wording is rather convoluted...
What's brown and sticky? ... a stick. Or a tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss