Don't worry about checking FlotsamAssetCache.m_CurrentlyWriting when updating access time.

The majority of updates won't be for anything currently writing and any sharing exception from an actual clash can be caught and ignored anyway.
mb-throttle-test
Justin Clark-Casey (justincc) 2014-12-04 01:46:00 +00:00
parent 5861401faa
commit c36bfdc60f
1 changed files with 1 additions and 8 deletions

View File

@ -256,17 +256,10 @@ namespace OpenSim.Region.CoreModules.Asset
// If the file is already cached, don't cache it, just touch it so access time is updated // If the file is already cached, don't cache it, just touch it so access time is updated
if (File.Exists(filename)) if (File.Exists(filename))
{ {
// We don't really want to know about sharing
// violations here. If the file is locked, then
// the other thread has updated the time for us.
try try
{ {
lock (m_CurrentlyWriting)
{
if (!m_CurrentlyWriting.Contains(filename))
File.SetLastAccessTime(filename, DateTime.Now); File.SetLastAccessTime(filename, DateTime.Now);
} }
}
catch catch
{ {
} }