aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-22 12:33:23 -0700
committerJohn Hurliman2009-10-22 12:33:23 -0700
commitb2ed348aa2746fbf034b713d006e40366c479d5a (patch)
tree26c114e88f54e64e1fdf17dcc7de1e54165db2bc /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.zip
opensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.tar.gz
opensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.tar.bz2
opensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.tar.xz
Implemented a Watchdog class. Do not manually create Thread objects anymore, use Watchdog.StartThread(). While your thread is running call Watchdog.UpdateThread(). When it is shutting down call Watchdog.RemoveThread(). Most of the threads in OpenSim have been updated
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 1607d34..9d97cb2 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -137,11 +137,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
137 if (cmdHandlerThread == null) 137 if (cmdHandlerThread == null)
138 { 138 {
139 // Start the thread that will be doing the work 139 // Start the thread that will be doing the work
140 cmdHandlerThread = new Thread(CmdHandlerThreadLoop); 140 cmdHandlerThread = Watchdog.StartThread(CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true);
141 cmdHandlerThread.Name = "AsyncLSLCmdHandlerThread";
142 cmdHandlerThread.Priority = ThreadPriority.BelowNormal;
143 cmdHandlerThread.IsBackground = true;
144 cmdHandlerThread.Start();
145 } 141 }
146 } 142 }
147 143
@@ -185,6 +181,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
185 Thread.Sleep(cmdHandlerThreadCycleSleepms); 181 Thread.Sleep(cmdHandlerThreadCycleSleepms);
186 182
187 DoOneCmdHandlerPass(); 183 DoOneCmdHandlerPass();
184
185 Watchdog.UpdateThread();
188 } 186 }
189 } 187 }
190 catch 188 catch