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
parent
5861401faa
commit
c36bfdc60f
|
@ -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 (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
|
||||
{
|
||||
lock (m_CurrentlyWriting)
|
||||
{
|
||||
if (!m_CurrentlyWriting.Contains(filename))
|
||||
File.SetLastAccessTime(filename, DateTime.Now);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue