neo4j/enterprise — pull request #44 by tinwelint (2012-05-24 12:31:13+00:00)
Title: Reduces contention regarding purging (evicting) entities from the gcr

cache. This is done by not synchronizing the purge method, but instead
keeping a flag if someone is doing a purge at the time that I (current
thread) would like to do a purge. If that's the case and if we're within
a slighly higher threshold we just return and get on with our business
and let the one doing the purge do that and count on it getting down the
cache to a decent size. If the cache size grows above the higher threshold
we will sit and wait for the current purge to complete to not flood the cache.
This makes threads help each other out and gives a buffer room where
contention would happen before, but will not happen anymore.