[
https://issues.apache.org/jira/browse/GEODE-5783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16662815#comment-16662815
]
ASF subversion and git services commented on GEODE-5783:
--------------------------------------------------------
Commit aaf1ec318ca87ed5df882885774cced6401edaa7 in geode's branch
refs/heads/feature/GEODE-5783b from [~bschuchardt]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=aaf1ec3 ]
GEODE-5783: have a single source for ThreadFactory
Use the keepalive parameter when initializing the thread factory.
I also made some logging changes while debugging the problems this
missing setting was causing.
> 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
> Fix For: 1.8.0
>
>
> 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)