ScriptEngine works again (startup-nully-error gone)
parent
f06a6573bb
commit
46cfc475aa
|
@ -42,13 +42,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
public class AsyncLSLCommandManager : iScriptEngineFunctionModule
|
||||
{
|
||||
private static Thread cmdHandlerThread;
|
||||
private int cmdHandlerThreadCycleSleepms;
|
||||
private static int cmdHandlerThreadCycleSleepms;
|
||||
|
||||
private ScriptEngine m_ScriptEngine;
|
||||
|
||||
public AsyncLSLCommandManager()
|
||||
public AsyncLSLCommandManager(ScriptEngine _ScriptEngine)
|
||||
{
|
||||
//m_ScriptEngine = _ScriptEngine;
|
||||
m_ScriptEngine = _ScriptEngine;
|
||||
ReadConfig();
|
||||
|
||||
StartThread();
|
||||
|
@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
}
|
||||
}
|
||||
|
||||
private void CmdHandlerThreadLoop()
|
||||
private static void CmdHandlerThreadLoop()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
|
@ -101,14 +101,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
while (true)
|
||||
{
|
||||
Thread.Sleep(cmdHandlerThreadCycleSleepms);
|
||||
lock (ScriptEngine.ScriptEngines)
|
||||
{
|
||||
foreach (ScriptEngine se in ScriptEngine.ScriptEngines)
|
||||
//lock (ScriptEngine.ScriptEngines)
|
||||
//{
|
||||
foreach (ScriptEngine se in new ArrayList(ScriptEngine.ScriptEngines))
|
||||
{
|
||||
m_ScriptEngine = se;
|
||||
m_ScriptEngine.m_ASYNCLSLCommandManager.DoOneCmdHandlerPass();
|
||||
se.m_ASYNCLSLCommandManager.DoOneCmdHandlerPass();
|
||||
}
|
||||
}
|
||||
//}
|
||||
// Sleep before next cycle
|
||||
//Thread.Sleep(cmdHandlerThreadCycleSleepms);
|
||||
}
|
||||
|
|
|
@ -73,9 +73,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
|
||||
public void ReadConfig()
|
||||
{
|
||||
//lock (ScriptEngine.ScriptEngines)
|
||||
//{
|
||||
foreach (ScriptEngine m_ScriptEngine in new ArrayList(ScriptEngine.ScriptEngines))
|
||||
lock (ScriptEngine.ScriptEngines)
|
||||
{
|
||||
foreach (ScriptEngine m_ScriptEngine in ScriptEngine.ScriptEngines)
|
||||
{
|
||||
ScriptEngineName = m_ScriptEngine.ScriptEngineName;
|
||||
nothingToDoSleepms = m_ScriptEngine.ScriptConfigSource.GetInt("SleepTimeIfNoScriptExecutionMs", 50);
|
||||
|
@ -106,7 +106,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
break;
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
// Now set that priority
|
||||
if (EventQueueThread != null)
|
||||
if (EventQueueThread.IsAlive)
|
||||
|
|
|
@ -164,9 +164,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
MaintenanceLoopTicks_Other_Count++;
|
||||
|
||||
|
||||
lock (ScriptEngine.ScriptEngines)
|
||||
{
|
||||
foreach (ScriptEngine m_ScriptEngine in ScriptEngine.ScriptEngines)
|
||||
//lock (ScriptEngine.ScriptEngines)
|
||||
//{
|
||||
foreach (ScriptEngine m_ScriptEngine in new ArrayList(ScriptEngine.ScriptEngines))
|
||||
{
|
||||
lastScriptEngine = m_ScriptEngine;
|
||||
// Re-reading config every x seconds
|
||||
|
@ -212,7 +212,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
m_ScriptEngine.m_ScriptManager.DoScriptLoadUnload();
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -110,7 +110,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
newScriptManager.Start();
|
||||
m_ScriptManager = newScriptManager;
|
||||
m_AppDomainManager = new AppDomainManager(this);
|
||||
m_ASYNCLSLCommandManager = new AsyncLSLCommandManager();
|
||||
m_ASYNCLSLCommandManager = new AsyncLSLCommandManager(this);
|
||||
if (m_MaintenanceThread == null)
|
||||
m_MaintenanceThread = new MaintenanceThread();
|
||||
|
||||
|
|
Loading…
Reference in New Issue