Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How two threads will communicate with each other?

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


Please Help Members By Posting Answers For Below Questions

how to use debug in my elipse to solve problems that exist in my project

2328


What is table mutation and how do you avoid it?

2515


What are the different types of exception?

1076


What is the difference between static and non-static with examples?

1989


Is the infobus client side only?

1161


Which textcomponent method is used to set a textcomponent to the read-only state?

1181


What is the difference between the string and stringbuffer classes?

1156


What is jboss?

1079


What is a tasks priority and how is it used in scheduling?

1100


What modifiers may be used with an inner class that is a member of an outer class?

1115


how i secure my site with the https protocol.what are the steps?

2389


What is a modular application? What does module-relative mean?

1116


What restrictions are placed on the values of each case of a switch statement?

1061


which book is better for jdbc ,servlets and jsp

2137


Is there a guarantee of uniqueness for entity beans?

1057