Explain interthread communication.

Questions by shwetakle

Showing Answers 1 - 9 of 9 Answers

vidyarthic

  • Nov 26th, 2007
 

A synchronization point at which two threads can exchange objects. Each thread presents some object on entry to the exchange method, and receives the object presented by the other thread on return.

  Was this answer useful?  Yes

AjayMukiri

  • Apr 29th, 2008
 

Java provides a basic set of synchronisation methods within java.lang.Object, allowing threads to wait for notification from other threads. Using the wait() and notify() methods, threads can synchronise with each other. However, in order to use these methods, they must be called within a synchronized code block, otherwise an IllegalMonitorException results. The thread that requires a synchronisation signal from another thread will call on the wait() method for an object. This will set the thread into a suspended mode until another thread sends a trigger by using the notify() method on the same object.

  Was this answer useful?  Yes

When threads are running in shared resources we can manage the threads by using native methods (wait(), notify(), notifyAll()) from Object class.

This is inter process communication between the threads while sharing shared resources


Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions