如题,没见过如此的锁应用,先上锁,然后解锁,再上锁,有点蚌埠住了 <img width="579" height="225" alt="Image" src="https://github.com/user-attachments/assets/e81a3819-36dc-407e-b1f6-29bb4cac9a19" /> 用局部作用域不是更好?还节省了上锁解锁的消耗 <img width="769" height="571" alt="Image" src="https://github.com/user-attachments/assets/1ffeba44-fd33-41ab-9c1c-91b035b9fb75" />