Thursday, 5 September 2013

Is the description written for thread.yield is correct?

Is the description written for thread.yield is correct?

I have a little doubt regarding Yield's definition:
In the java docs. Yield is described as :
public static void [yield][1]()
A hint to the scheduler that the current thread is willing to yield its
current use of a processor. The scheduler is free to ignore this hint.
And it means that current thread is not pausing temporarily. It is just
indicating to scheduler. Now it is upto the scheduler to decide if he want
to stop the execution of thread or not.Right?
And here at this link, it is written that on yield, thread will be
definitely suspended.
http://www.tutorialspoint.com/java/lang/thread_yield.htm
Can someone explain it?

No comments:

Post a Comment