Xengine: remove a no thread safe locking, don't allocate a few objects only needed if creating a new domain

LSLKeyTest
UbitUmarov 2016-08-30 08:56:35 +01:00
parent ed555801a4
commit 4e1784d069
1 changed files with 17 additions and 22 deletions

View File

@ -1024,8 +1024,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
// m_log.DebugFormat("[XEngine]: Added script {0} to compile queue", itemID);
if (m_CurrentCompile == null)
{
// NOTE: Although we use a lockless queue, the lock here
// is required. It ensures that there are never two
// compile threads running, which, due to a race
@ -1038,7 +1036,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
}
}
}
}
public Object DoOnRezScriptQueue(Object dummy)
{
@ -1296,6 +1293,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
if (!m_AppDomains.ContainsKey(appDomain))
{
try
{
AppDomain sandbox;
if (m_AppDomainLoading)
{
AppDomainSetup appSetup = new AppDomainSetup();
appSetup.PrivateBinPath = Path.Combine(
@ -1305,9 +1305,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
Evidence baseEvidence = AppDomain.CurrentDomain.Evidence;
Evidence evidence = new Evidence(baseEvidence);
AppDomain sandbox;
if (m_AppDomainLoading)
{
sandbox = AppDomain.CreateDomain(
m_Scene.RegionInfo.RegionID.ToString(),
evidence, appSetup);
@ -1472,9 +1469,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
startParam, postOnRez,
m_MaxScriptQueue);
if (
!instance.Load(
scriptObj, coopSleepHandle, assemblyPath,
if(!instance.Load(scriptObj, coopSleepHandle, assemblyPath,
Path.Combine(ScriptEnginePath, World.RegionInfo.RegionID.ToString()), stateSource, coopTerminationForThisScript))
return false;