ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

What is the difference between yielding and sleeping?

Sleep holds the threads execution for the specified time. On the other hand, yield will cause the thread to rejoin the queue. When a task is invoked in yielding, it returns to the ready state. While when a task is invoked in sleeping, it returns to the waiting state.

 

Related Posts Plugin for WordPress, Blogger...
Flag Counter