sleep有没有释放锁
时间: 2023-10-08 13:09:02 浏览: 100
根据引用的内容,sleep方法在使用时不会释放对象锁,即当前线程睡眠期间其他线程无法访问被该线程锁住的对象。因此,sleep方法不会释放锁。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [使用sleep方法,线程进入sleep休眠状态不会释放锁](https://blog.csdn.net/m0_46080170/article/details/117456872)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [C#中sleep和wait的区别分析](https://download.csdn.net/download/weixin_38633967/14873497)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [sleep,yield,wait,join操作是否会释放锁资源](https://blog.csdn.net/LM1997/article/details/124188663)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文