1.

What Does Yield Method Of Thread Class Do?

Answer»

yield() method causes the currently executing thread object to temporarily pause and allow other threads to execute. If there is no waiting thread or all the waiting threads have a LOWER priority than the CURRENT thread, then the same thread will continue its execution. When the yielded thread will GET the CHANCE for execution is decided by the thread scheduler WHOSE behavior is platform dependent.

yield() method causes the currently executing thread object to temporarily pause and allow other threads to execute. If there is no waiting thread or all the waiting threads have a lower priority than the current thread, then the same thread will continue its execution. When the yielded thread will get the chance for execution is decided by the thread scheduler whose behavior is platform dependent.



Discussion

No Comment Found