A question for the real profis.
When a
thread enters a synchronized method (or block) and locks the object, what happens when a non-synchronized method is called within this synchronized block? Does the thread give ups its lock? Or does it wait until leaving the synchronized method (or block)?
In other words, are non-synchronized methods only non-synchronized when called directly, but are "synchronization-supporting" (in the sense that they keep the established lock) as long as they are called from a synchronized context? What is going on exactly?
This may be a tough question. Be honest, if you are not sure about the answer.
Thanks.
Is my question clear?