Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/966#discussion_r192791782
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/mgmt/persist/StoreObjectAccessorLocking.java
 ---
    @@ -225,6 +225,21 @@ public void waitForCurrentWrites(Duration timeout) 
throws InterruptedException,
             }
         }
         
    +    @Override
    +    public boolean isWriting() {
    +        try {
    +            boolean locked = lock.readLock().tryLock(0, 
TimeUnit.MILLISECONDS);
    --- End diff --
    
    Just a question - won't this fail to get the lock if another thread has a 
_read_ lock already - so `isWriting` will return `true` - even though nothing 
may have a write lock?  Even if that's true, does it matter?


---

Reply via email to