Comments (6)
这里是四种类型的锁,具体的锁,在reids中
from spring-boot-klock-starter.
@klboke 但是根据源码 这里面一种类型获取的都是同一把锁,区别就是lockInfo不同而已,, 这就导致,如果我一个操作嵌套了另外一个加锁的方法,内存方法的锁就会覆盖外层方法的锁,,导致内层的锁释放两次,而外层的锁无法自动释放,需要等待到lesstime才能释放
from spring-boot-klock-starter.
不清楚你的意思,方法执行前拿到锁,执行后释放锁
from spring-boot-klock-starter.
Lock的实现中访问了成员变量rLock
, 是线程不安全的。
同意LZ观点。
from spring-boot-klock-starter.
能否提供个具体线程不安全的例子,redisson的锁本身是加了线程id的
from spring-boot-klock-starter.
@91wangmeng 感谢你的反馈,问题已确认并修复
from spring-boot-klock-starter.
Related Issues (20)
- 问下为什么解锁使用了异步强制解锁?有什么必要使用它嘛?使用异步强制解锁有什么优点嘛?相比于正常的同步解锁 HOT 1
- 报错了。。 HOT 1
- 命名不太符合spring boot规范 HOT 1
- 希望能使用spring.redis.xxx的配置 HOT 1
- Spring MVC项目怎么引用呢 HOT 1
- redis连接池不用配置吗 HOT 2
- 指定lock的name属性,redis设置的key并不止name,还是会加上其他的字符 HOT 1
- 关于keys,有几个问题想请教下 HOT 3
- 同一线程中嵌套调用引发的问题 HOT 2
- @KlockKey 方法参数为null时报空指针 HOT 3
- 同一线程同一把锁重入时的问题 HOT 4
- 是否支持非注解模式
- 是否支持非spring管理类的使用
- 很优秀的开源分布式锁,请问还维护吗 HOT 7
- 报错:求助
- 读写锁没有意义
- 最大连接数可以限制吗?
- 2022年了请问还维护吗 HOT 2
- 如果不配置klock的 redis配置,是否使用默认的redis
- 一个集群一个服务部署了多个副本,通过定时任务内部调接口提示一直被锁,返回失败。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot-klock-starter.