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