mirror of
https://github.com/opensim/opensim.git
synced 2026-07-02 00:15:45 +08:00
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
This commit is contained in:
@@ -137,11 +137,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (cmdHandlerThread == null)
|
||||
{
|
||||
// Start the thread that will be doing the work
|
||||
cmdHandlerThread = new Thread(CmdHandlerThreadLoop);
|
||||
cmdHandlerThread.Name = "AsyncLSLCmdHandlerThread";
|
||||
cmdHandlerThread.Priority = ThreadPriority.BelowNormal;
|
||||
cmdHandlerThread.IsBackground = true;
|
||||
cmdHandlerThread.Start();
|
||||
cmdHandlerThread = Watchdog.StartThread(CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,6 +181,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
Thread.Sleep(cmdHandlerThreadCycleSleepms);
|
||||
|
||||
DoOneCmdHandlerPass();
|
||||
|
||||
Watchdog.UpdateThread();
|
||||
}
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in New Issue
Block a user