Quantcast
Channel: difference between wait() and yield() - Stack Overflow
Viewing all articles
Browse latest Browse all 5

difference between wait() and yield()

$
0
0

So far what I have understood about wait() and yield () methods is that yield() is called when the thread is not carrying out any task and lets the CPU execute some other thread. wait() is used when some thread is put on hold and usually used in the concept of synchronization. However, I fail to understand the difference in their functionality and i'm not sure if what I have understood is right or wrong. Can someone please explain the difference between them(apart from the package they are present in).


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images