[ 
https://issues.apache.org/jira/browse/GEODE-5783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Darrel Schneider reassigned GEODE-5783:
---------------------------------------

    Assignee: Darrel Schneider

> geode should use a single class to create instances of ThreadFactory
> --------------------------------------------------------------------
>
>                 Key: GEODE-5783
>                 URL: https://issues.apache.org/jira/browse/GEODE-5783
>             Project: Geode
>          Issue Type: Improvement
>          Components: core
>            Reporter: Darrel Schneider
>            Assignee: Darrel Schneider
>            Priority: Major
>
> Geode creates a large number of ThreadFactory instances. Most of these are 
> created with anonymous inner classes. In most cases the ThreadFactory 
> instance is passed on to a thread pool. Since thread pools are finalizable 
> they will keep alive anything they reference until finalization takes place. 
> Most JVM garbage collectors delay doing finalization as long as possible. 
> Since an anonymous inner class always has a references to the outer class 
> instance, a number of places will end up having a reference to our single 
> GemFireCacheImpl which can end up preventing a large amount of heap from 
> being garbage collected.
> For the above reasons, and also to avoid code duplication, it would be better 
> if we had a single utility class that took care of creating ThreadFactory 
> instances. We already have one such class in geode named GemFireCacheHelper 
> that is only used from one class. Also google guava has ThreadFactoryBuilder 
> which could be used.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to