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

Why doesn’t the focus feature on the tag work in every circumstance?

1171


What is a class loader?

2079


Where we can write Rmi registry in the code, without having to write it at the command prompt?

2831


Why are component architectures useful?

1120


What is the infobus?

1136


Difference between new operator and class.forname().newinstance()?

1180


Can I run seam with jdk 1.4 and earlier?

1051


What is JTS?

2431


Difference between swing and awt?

1386


What is a policy?

2351


In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?

1225


What class is used to create Server side object ?

2313


difference between  ejb,struts,hibernate,spring and jsp

2923


What classes of exceptions may be caught by a catch clause?

1080


AS a developer will u create a data source in connection pool? If so how will u do that, how to access the object from connection pool using IRAD tool?

2201