mirror of
https://github.com/jamenai/opensim-addon-modules-exp.git
synced 2026-07-30 22:52:14 +00:00
fix Lazy with use of OpenSim.Framework.Lazy
This commit is contained in:
+2
-2
@@ -243,7 +243,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||
private readonly object timerLock = new();
|
||||
|
||||
private ConcurrentDictionary<string, WeakReference<AssetBase>> weakAssetReferences = new();
|
||||
private readonly ConcurrentDictionary<string, Lazy<AssetBase>> m_inflightFetches = new();
|
||||
private readonly ConcurrentDictionary<string, OpenSim.Framework.Lazy<AssetBase>> m_inflightFetches = new();
|
||||
|
||||
private static bool m_updateFileTimeOnCacheHit = false;
|
||||
|
||||
@@ -842,7 +842,7 @@ namespace OpenSim.Region.CoreModules.Asset
|
||||
bool created = false;
|
||||
var lazyFetch = m_inflightFetches.GetOrAdd(
|
||||
id,
|
||||
_ => { created = true; return new Lazy<AssetBase>(() => FetchUpstream(id), LazyThreadSafetyMode.ExecutionAndPublication); }
|
||||
_ => { created = true; return new OpenSim.Framework.Lazy<AssetBase>(() => FetchUpstream(id), OpenSim.Framework.LazyThreadSafetyMode.ExecutionAndPublication); }
|
||||
);
|
||||
if (!created) Interlocked.Increment(ref m_InFlightJoins);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user