|
Return in the Middle of synchronized Block
Hi,
What will happen if a code "return's" in the middle of synchronized block? Does it release a lock on the object that is holding or the lock would forever stay locked? i.e.
synchronized (obj) {
if(/* some condition */) {
return;
}
}
|