river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregg Wonderly <gr...@wonderly.org>
Subject Re: DynamicPolicyProvider concurrency
Date Thu, 29 Oct 2009 23:17:23 GMT
Peter Firmstone wrote:
> Gregg Wonderly wrote:
>> I have been looking into some seemingly slow responses in several 
>> clients running simultaneously, and I see in some stack traces that 
>> there are synchronization points in DynamicPolicyProvider.implies() 
>> that seem to be heavily contended.  We probably need to revisit this 
>> class and rewrite it to use copy on write mutation so that reads (the 
>> majority of activity) are completely uncontended.
>> Any thoughts or experience with this issue?
> This sounds like a job for java.util.concurrent.ReentrantReadWriteLock! 
>  Da dat, da dat, da dat, da da!   Requires Java 5, works well, the 
> javadoc is clear too.  Can you submit this as an issue on Jira?

We don't actually want to lock, we just want to use a copy on write update 
strategy that does lock but set volatile references to the new contents.

Gregg Wonderly

View raw message