useless changes

master
UbitUmarov 2020-07-15 05:15:32 +01:00
parent 6c5bf4ed25
commit 6a27f3fb20
2 changed files with 10 additions and 8 deletions

View File

@ -3058,10 +3058,12 @@ namespace OpenSim.Framework
{
Interlocked.Decrement(ref numRunningThreadFuncs);
threadInfo.Ended();
ThreadInfo dummy;
activeThreads.TryRemove(threadFuncNum, out dummy);
activeThreads.TryRemove(threadFuncNum, out ThreadInfo dummy);
if ((loggingEnabled || (threadFuncOverloadMode == 1)) && threadInfo.LogThread)
m_log.DebugFormat("Exit threadfunc {0} ({1})", threadFuncNum, FormatDuration(threadInfo.Elapsed()));
callback = null;
o = null;
threadInfo = null;
}
};
}
@ -3083,10 +3085,10 @@ namespace OpenSim.Framework
case FireAndForgetMethod.SmartThreadPool:
if (m_ThreadPool == null)
InitThreadPool(2, 15);
threadInfo.WorkItem = m_ThreadPool.QueueWorkItem((cb, o) => cb(o), realCallback, obj);
threadInfo.WorkItem = m_ThreadPool.QueueWorkItem((cb, o) => {cb(o); cb = null;}, realCallback, obj);
break;
case FireAndForgetMethod.Thread:
Thread thread = new Thread(delegate(object o) { realCallback(o); });
Thread thread = new Thread(delegate(object o) { realCallback(o); realCallback = null;});
thread.Start(obj);
break;
default:
@ -3096,8 +3098,7 @@ namespace OpenSim.Framework
catch (Exception)
{
Interlocked.Decrement(ref numQueuedThreadFuncs);
ThreadInfo dummy;
activeThreads.TryRemove(threadFuncNum, out dummy);
activeThreads.TryRemove(threadFuncNum, out ThreadInfo dummy);
throw;
}
}

View File

@ -249,7 +249,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
public AssetMetadata GetMetadata(string id)
{
AssetBase asset = null;
if (m_Cache != null)
{
if (!m_Cache.Get(id, out asset))
@ -301,7 +300,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (asset != null)
{
Util.FireAndForget(delegate { handler(id, sender, asset); }, null, "HGAssetBroker.GotFromCache");
Util.FireAndForget(delegate { handler(id, sender, asset); asset = null; }, null, "HGAssetBroker.GotFromCache");
return true;
}
@ -312,6 +311,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (m_Cache != null)
m_Cache.Cache(a);
handler(assetID, s, a);
a = null;
});
}
else
@ -321,6 +321,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (m_Cache != null)
m_Cache.Cache(a);
handler(assetID, s, a);
a = null;
});
}
}