通过一个叫做可更新锁( upgradeable lock), 来解决这个问题。
基于14个网页-相关网页
upgradeable lock
可升级的锁
以上为机器翻译结果,长、整句建议使用 人工翻译 。
For example, if a thread enters a lock in upgradeable mode and then enters the lock in write mode, the order in which the thread exits the two modes does not matter.
例如,如果一个线程先进入可升级模式锁定状态,然后再进入写入模式锁定状态,则线程可以任何顺序退出这两种模式。
youdao
应用推荐
模块上移
模块下移
不移动