Monday, March 2, 2015

Java Thread's yield() method

Thread's yield() method

It is a static method. yield() method takes the currently running thread to back to the runnable state
so the other equal's priority thread will get a chance to run. but it is not guaranteed that
the same thread will not get in execution back. it can come back in the running state.

yield() method doesn't take the thread into wait/sleep/blocking state.
it just takes the current running thread into runnable state. just for giving chance to other threads in
the Runnable pool.


Keep Visiting 
Give your comment 

No comments:

Post a Comment

Scrum and Scrum master

Scrum  Scrum is a framework which helps a team to work together.  It is like a rugby team (the scrum name comes from rugby game). Scrum enco...