Tagged Questions
2
votes
1answer
247 views
How to achieve thread synchronizing without effecting the efficiency in java [closed]
Say using following function:
public synchronized int getUnique(){
MyObject obj = getValueFromDb();
obj.modifyIt();
obj.commit();
}
When simultaneous call is made to this method several ...