优化锁的使用

This commit is contained in:
Yun
2024-12-12 11:30:24 +08:00
parent 571b852c1a
commit cd0273f4b2
4 changed files with 69 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
1.这个锁是基于redis的全局锁
2.在同一个new下边,多次加锁是可以重入的(因为值是一致)
3.多次加锁只要执行了一次释放,这个锁将会被释放