[infinispan-dev] Leaking ThreadLocal

Galder Zamarreño galder at redhat.com
Wed Jun 11 06:38:26 EDT 2014


On 10 Jun 2014, at 10:31, Sanne Grinovero <sanne at infinispan.org> wrote:

> Hi all,
> as spotted by the testsuite - which was rightfully complaining - the
> CHMv8 which we backported from the JDK has a static ThreadLocal that
> it uses internally.
> 
> Our copy is having the same, and so Dan enhanced the "ThreadLocal
> detection" utility in the testsuite to "allow" specific threadlocal
> instances; nice as at least infinispan-core now has no more failures.
> 
> Next the bigger question: this might be ok in the JDK - which
> obviously doesn't get redeployed - but is it ok in our stuff?
> I guess the answer is no.. would you all agree that the CHM instances
> should share an instance whose lifecycle has to be managed by the
> CacheManager ?

Either that or modify CHMv8 code to use a ConcurrentWeakKeyHashMap<Thread, CounterHashCode> instance variable.

We could also email concurrency-interest at cs.oswego.edu to get any other suggestions from Doug et al?

Cheers,

> 
> Cheers,
> Sanne
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


--
Galder Zamarreño
galder at redhat.com
twitter.com/galderz




More information about the infinispan-dev mailing list