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

What is local interface. How values will be passed?

1026


How messaging services are done, before release of JMS?

2145


Which characters may be used as the second character of an identifier, but not as the first character of an identifier?

1054


why static class in java

1775


What is the difference between the session.update() method and the session.lock() method?

1015


What is the difference between java class and bean?

1087


Why does the tag url-encode javascript and mailto links?

1010


What is abstract schema?

1029


How to determine SGA site?

2543


Difference between hashmap and hashtable?

1159


For which statements does it make sense to use a label?

1083


how do you Handle Front End Application data against DB with example?

1983


Should synchronization primitives be used on bean methods?

1069


What are the different class loaders used by jvm?

1099


What is glasgow?

1060