阅读背景:

第二个线程如何检查并重新检查第一个线程当前使用的类的锁定对象?

来源:互联网 

My understanding of the synchronized method in java, where the first thread acquires the lock object, so that if the second thread checks it sees it is in use and "waits" until thread one completes, then the lock is passed back, whereas the second thread could acquire the lock and continue. Just learning so if that off/over simplified...that is why.My understanding of the synchronized method in




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: