Giter Site home page Giter Site logo

Comments (6)

klboke avatar klboke commented on May 27, 2024

这里是四种类型的锁,具体的锁,在reids中

from spring-boot-klock-starter.

91wangmeng avatar 91wangmeng commented on May 27, 2024

@klboke 但是根据源码 这里面一种类型获取的都是同一把锁,区别就是lockInfo不同而已,, 这就导致,如果我一个操作嵌套了另外一个加锁的方法,内存方法的锁就会覆盖外层方法的锁,,导致内层的锁释放两次,而外层的锁无法自动释放,需要等待到lesstime才能释放

from spring-boot-klock-starter.

klboke avatar klboke commented on May 27, 2024

不清楚你的意思,方法执行前拿到锁,执行后释放锁

from spring-boot-klock-starter.

qrqhuang avatar qrqhuang commented on May 27, 2024

Lock的实现中访问了成员变量rLock, 是线程不安全的。
同意LZ观点。

from spring-boot-klock-starter.

klboke avatar klboke commented on May 27, 2024

能否提供个具体线程不安全的例子,redisson的锁本身是加了线程id的

from spring-boot-klock-starter.

klboke avatar klboke commented on May 27, 2024

@91wangmeng 感谢你的反馈,问题已确认并修复

from spring-boot-klock-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.