|
|
|
|
Here's what the Condition interface javadoc says about itself: Conditions (also known as condition queues or condition variables) provide a means for one thread to suspend execution (to "wait") until notified by another thread that some state condition may now be true. Because access to this shared state information occurs in different threads, it must be protected, so a lock of some form is associated with the condition. The key property that waiting for a condition provides is that it atomically releases the associated lock and suspends the current thread, just like Object.wait.A Condition instance is intrinsically bound to a lock. To obtain a Condition
instance for a particular
|
| The page was last updated February 19, 2008 |