[ 
https://issues.apache.org/jira/browse/GEODE-5783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16664162#comment-16664162
 ] 

ASF subversion and git services commented on GEODE-5783:
--------------------------------------------------------

Commit dab891b621eafde3dcf7608dcf38f0c0b17475c2 in geode's branch 
refs/heads/feature/GEODE-5927 from [~bschuchardt]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=dab891b ]

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
>              Labels: pull-request-available
>             Fix For: 1.8.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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