commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: logging: WeakHashtable
Date Wed, 17 Nov 2004 23:32:55 GMT
i've commit the patch of the 15th (with a few minor changes). thanks.

this means that the value is (effectively) held by a hard reference 
whilst the key is held by a weak. this should address the narrow issue 
of the most typical use case. i think that probably the code could be 
improved by eliminating some unnecessary complexity but that'll have to 
wait till tomorrow.

one interesting feature of garbage collectors (which foxed me for a 
while) is that there doesn't seem to be any guarantee as to when the 
reference is placed onto the queue. (at least i can't find one: if 
anyone knows different please jump in.) on the (macOSX) JVM i use, it 
appears that the reference is placed onto the queue late enough to 
cause one of the tests to fail. placing a hard loop that polls for the 
released reference to be placed on another queue results in the test 

- robert

On 16 Nov 2004, at 15:12, Brian Stansberry wrote:

> Attached is a patch to LogFactory that attempts to
> play classloader tricks to prevent the hard reference
> problem.  This is not meant to be applied; the patch
> is just a shorthand way to communicate ideas I'm
> playing with.
> This seemed to work in the sense that the tests I
> added to LogFactoryTest pass.  But, o.a.c.l.LoadTest
> fails with a ClassCastException.  Other tests in that
> package pass. Haven't had time to try and analyze
> what's going on with the LoadTest.
> Gotta run to work.
> - brian
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - Get yours free!
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message