Java Training - InterThread Communication - 0 views
-
Merit Campus on 10 Nov 14Inter Thread Communication is one of the distinct facility in multi Threading application development of java. In real world Inter Thread communication based applications of java works faster when compared to all the other applications in java. Inter-Thread communication is all about making synchronized Threads communicate with each other. It is a mechanism in which a Thread is paused running in its critical section and another Thread is allowed to enter in the same critical section to be executed. It is implemented by following methods of Object class wait() : Tells the calling Thread to give up monitor and go to sleep until some other Thread enters the same monitor and call notify. Causes current Thread to release the lock and wait until either another Thread invokes the notify() method or the notifyAll() method for this object, or a specified amount of time has elapsed. The current Thread must own this object's monitor.