Synchronized and local copies of variables

后端 未结 4 2052

I\'m looking at some legacy code which has the following idiom:

Map myMap = someGlobalInstance.getMap();
synchronized (myMap) {
    item =         


        
4条回答
提交回复
热议问题