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
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