brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Thread pool for persisting to Obj...
Date Thu, 03 Jul 2014 10:24:46 GMT
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/41#discussion_r14506781
  
    --- Diff: core/src/main/java/brooklyn/entity/rebind/persister/BrooklynMementoPersisterToObjectStore.java
---
    @@ -335,12 +501,20 @@ public void waitForWritesCompleted(long timeout, TimeUnit unit)
throws Interrupt
         }
         
         public void waitForWritesCompleted(Duration timeout) throws InterruptedException,
TimeoutException {
    +        lock.writeLock().lockInterruptibly();
    +        lock.writeLock().unlock();
    +        
             for (StoreObjectAccessorWithLock writer : writers.values())
                 writer.waitForCurrentWrites(timeout);
    --- End diff --
    
    is this still needed if we have the `lock` ?  feels like writes should have completed
without this (no harm in this extra check, but worth a comment)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message