I am reading about Condition in java.util.concurrent.locks.Condition
.
Condition factors out the Object monitor methods (wait, notify and notifyAll) >into distinct objects to give the effect of having multiple wait-sets per object, by combining them with the use of arbitrary Lock implementations.
Can somebody explain me this?
How this is a benefit over normal synchronization blocks or method?
For a bounded DataStructure for example, you can have the Conditions "notEmpty" and "notFull" and wait for them. Just one example. Have a look at the example here.