diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs index 556593d..33c6511 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs | |||
@@ -42,13 +42,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
42 | public class AsyncLSLCommandManager : iScriptEngineFunctionModule | 42 | public class AsyncLSLCommandManager : iScriptEngineFunctionModule |
43 | { | 43 | { |
44 | private static Thread cmdHandlerThread; | 44 | private static Thread cmdHandlerThread; |
45 | private int cmdHandlerThreadCycleSleepms; | 45 | private static int cmdHandlerThreadCycleSleepms; |
46 | 46 | ||
47 | private ScriptEngine m_ScriptEngine; | 47 | private ScriptEngine m_ScriptEngine; |
48 | 48 | ||
49 | public AsyncLSLCommandManager() | 49 | public AsyncLSLCommandManager(ScriptEngine _ScriptEngine) |
50 | { | 50 | { |
51 | //m_ScriptEngine = _ScriptEngine; | 51 | m_ScriptEngine = _ScriptEngine; |
52 | ReadConfig(); | 52 | ReadConfig(); |
53 | 53 | ||
54 | StartThread(); | 54 | StartThread(); |
@@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
95 | private void CmdHandlerThreadLoop() | 95 | private static void CmdHandlerThreadLoop() |
96 | { | 96 | { |
97 | while (true) | 97 | while (true) |
98 | { | 98 | { |
@@ -101,14 +101,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
101 | while (true) | 101 | while (true) |
102 | { | 102 | { |
103 | Thread.Sleep(cmdHandlerThreadCycleSleepms); | 103 | Thread.Sleep(cmdHandlerThreadCycleSleepms); |
104 | lock (ScriptEngine.ScriptEngines) | 104 | //lock (ScriptEngine.ScriptEngines) |
105 | { | 105 | //{ |
106 | foreach (ScriptEngine se in ScriptEngine.ScriptEngines) | 106 | foreach (ScriptEngine se in new ArrayList(ScriptEngine.ScriptEngines)) |
107 | { | 107 | { |
108 | m_ScriptEngine = se; | 108 | se.m_ASYNCLSLCommandManager.DoOneCmdHandlerPass(); |
109 | m_ScriptEngine.m_ASYNCLSLCommandManager.DoOneCmdHandlerPass(); | ||
110 | } | 109 | } |
111 | } | 110 | //} |
112 | // Sleep before next cycle | 111 | // Sleep before next cycle |
113 | //Thread.Sleep(cmdHandlerThreadCycleSleepms); | 112 | //Thread.Sleep(cmdHandlerThreadCycleSleepms); |
114 | } | 113 | } |