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: Tasks stop on unmanaged
Date Fri, 17 Oct 2014 09:21:05 GMT
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/252#discussion_r19008511
  
    --- Diff: core/src/main/java/brooklyn/util/task/BasicExecutionManager.java ---
    @@ -101,24 +95,36 @@
         // TODO Could have a set of all knownTasks; but instead we're having a separate set
per tag,
         // so the same task could be listed multiple times if it has multiple tags...
     
    -    //access to the below is synchronized in code in this class, to allow us to preserve
order while guaranteeing thread-safe
    +    //access to this field AND to members in this field is synchronized, 
    +    //to allow us to preserve order while guaranteeing thread-safe
         //(but more testing is needed before we are sure it is thread-safe!)
         //synch blocks are as finely grained as possible for efficiency
         //Not using a CopyOnWriteArraySet for each, because profiling showed this being a
massive perf bottleneck.
    -    private ConcurrentMap<Object,Set<Task<?>>> tasksByTag = new ConcurrentHashMap<Object,Set<Task<?>>>();
    +    private Map<Object,Set<Task<?>>> tasksByTag = new HashMap<Object,Set<Task<?>>>();
    --- End diff --
    
    yes.  i noticed a leak where we might ask for tasks with tags after a tag is no longer
in use.


---
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