Answer Posted / bindhu
Two threads can communicate with each other using
the wait() and notify() , notifyAl() methods. wait()
method tells the thread to wait until another threads
calls notify() method.
The wait() method causes the current thread to wait
(possibly forever) until another thread notifies it of a
condition change. We use wait() in conjunction with notify
() or notifyAll() to coordinate the activities of multiple
threads using the same resources.
The notifyAll() method notifies all the threads waiting on
the monitor held by the current thread and wakes them up.
Typically, one of the waiting threads will grab the monitor
and proceed.
| Is This Answer Correct ? | 57 Yes | 8 No |
Post New Answer View All Answers
how to use debug in my elipse to solve problems that exist in my project
What is table mutation and how do you avoid it?
What are the different types of exception?
What is the difference between static and non-static with examples?
Is the infobus client side only?
Which textcomponent method is used to set a textcomponent to the read-only state?
What is the difference between the string and stringbuffer classes?
What is jboss?
What is a tasks priority and how is it used in scheduling?
What modifiers may be used with an inner class that is a member of an outer class?
how i secure my site with the https protocol.what are the steps?
What is a modular application? What does module-relative mean?
What restrictions are placed on the values of each case of a switch statement?
which book is better for jdbc ,servlets and jsp
Is there a guarantee of uniqueness for entity beans?