[kepler-dev] Thread synchronization in org.kepler.objectmanager.cache.DataCacheManager?

Chad Berkley berkley at nceas.ucsb.edu
Tue Aug 16 13:34:22 PDT 2005

I'm currently working on that class.  It has many issues, this one only 
being one of them.  Thanks for pointing it out though.  I'll make sure I 
add this to the list of things to fix.


Kevin Ruland wrote:
> Hi all
> While exploring the code, I noticed something which raised my internal
> alarm.  In org.kepler.objectmanager.cache.DataCacheManager.saveCache()
> method, there is a spin lock on the variable mDoingSave.  I have a
> couple of concerns about this. First the code optimizer might eliminate
> the loop because it doesn't do anything.  Second, because there are no
> synchronized keywords about, this code, even if it functions, is a race
> condition.
> Matt mentioned to me that this method might only be used during
> application shutdown.  However, it's called from
> org.ecoinformatics.seek.datasource.DarwinCoreSchema.loadDarwinCodeSchema())
> which by name alone does not seem likely to be called during shutdown. 
> He also said that this class is currently under active development and I
> might have caught it in an unsavory state.
> Kevin
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev

More information about the Kepler-dev mailing list