PDA

View Full Version : @synchronized




davbeck
Oct 29, 2009, 12:32 AM
I am a little curious about @synchronized. If I understand it correctly, @synchronized(object) will block the statement for that object only. So if another thread comes along and tries to execute that section of code with a different object, it will go right ahead and do it, but if another thread comes along and tries to execute the code with the same object, it will be blocked.