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,16 +256,9 @@ 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)
|
File.SetLastAccessTime(filename, DateTime.Now);
|
||||||
{
|
|
||||||
if (!m_CurrentlyWriting.Contains(filename))
|
|
||||||
File.SetLastAccessTime(filename, DateTime.Now);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue