From ae8e67d20c0c29e46f97c8f9829628604ffb83a9 Mon Sep 17 00:00:00 2001 From: Lordfox Date: Sat, 4 Oct 2025 19:19:14 +0200 Subject: [PATCH] fix Lazy with use of OpenSim.Framework.Lazy --- .../Modules/ConcurrentFlotsamAssetCache.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/OpenSimConcurrentFlotsamAssetCache/addon-modules/OpenSimConcurrentFlotsamAssetCache/Modules/ConcurrentFlotsamAssetCache.cs b/modules/OpenSimConcurrentFlotsamAssetCache/addon-modules/OpenSimConcurrentFlotsamAssetCache/Modules/ConcurrentFlotsamAssetCache.cs index 074c84d..a5bf2ba 100644 --- a/modules/OpenSimConcurrentFlotsamAssetCache/addon-modules/OpenSimConcurrentFlotsamAssetCache/Modules/ConcurrentFlotsamAssetCache.cs +++ b/modules/OpenSimConcurrentFlotsamAssetCache/addon-modules/OpenSimConcurrentFlotsamAssetCache/Modules/ConcurrentFlotsamAssetCache.cs @@ -243,7 +243,7 @@ namespace OpenSim.Region.CoreModules.Asset private readonly object timerLock = new(); private ConcurrentDictionary> weakAssetReferences = new(); - private readonly ConcurrentDictionary> m_inflightFetches = new(); + private readonly ConcurrentDictionary> 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(() => FetchUpstream(id), LazyThreadSafetyMode.ExecutionAndPublication); } + _ => { created = true; return new OpenSim.Framework.Lazy(() => FetchUpstream(id), OpenSim.Framework.LazyThreadSafetyMode.ExecutionAndPublication); } ); if (!created) Interlocked.Increment(ref m_InFlightJoins);