| Author |
Object that is Locked
|
Allen Bandela
Ranch Hand
Joined: Feb 16, 2006
Posts: 127
|
|
If a thread has obtained a lock on an object, i.e. it is within a synchronized block, can another thread modify that object? For example, class C{ methodA(){ synchronized(this) } methodB(){ } } When Thread1 is in synchronized block in methodA, can another thread run methodB Thanks
|
Life is like a day. If the day is of no use, neither a month or a year.
|
 |
Chandra Bhatt
Ranch Hand
Joined: Feb 28, 2007
Posts: 1707
|
|
|
Yeah, other non-sync methods could be called simultaneously.
|
cmbhatt
|
 |
 |
|
|
subject: Object that is Locked
|
|
|