|
|
|
|
A Consumer thread is typically waiting on some condition to become true. While the condition remains false, the Consumer thread must continue to wait. The waiting is performed by calling the wait() method, and the notification is performed by calling the notify() method. Every class has access to these methods, since they are implemented in the Object class -- the ultimate global superclass. Each of these methods must be called from within a synchronized block.
|
| The page was last updated February 19, 2008 |