Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一种方法可以检查此类事务是否锁定了一个特定的事物。但是对于 ReadLock,同一个对象上可以有多个 ReadLock。有没有办法可以检查我有多少份该对象?
您是否尝试过ReentrantReadWriteLock.getReadLockCount()?