线程同步,有两种用法,一种是在方法上加synchronized,另一种是什么?线程同步,能否请高手解释一下,比如在方法上加synchronized,有什么作用?
参考资料:http://zhidao.baidu.com/question/24822803.html