Added config var to fiddle with the Interval for the service throttle thread

cpu-performance
Diva Canto 2013-07-16 17:53:05 -07:00
parent 9f578cf0c8
commit d4720bd721
1 changed files with 4 additions and 1 deletions

View File

@ -54,11 +54,14 @@ namespace OpenSim.Region.CoreModules.Framework
// private OpenSim.Framework.DoubleQueue<GridRegionRequest> m_RequestQueue = new OpenSim.Framework.DoubleQueue<GridRegionRequest>(); // private OpenSim.Framework.DoubleQueue<GridRegionRequest> m_RequestQueue = new OpenSim.Framework.DoubleQueue<GridRegionRequest>();
//private Queue<GridRegionRequest> m_RequestQueue = new Queue<GridRegionRequest>(); //private Queue<GridRegionRequest> m_RequestQueue = new Queue<GridRegionRequest>();
private Queue<Action> m_RequestQueue = new Queue<Action>(); private Queue<Action> m_RequestQueue = new Queue<Action>();
private int m_Interval;
#region ISharedRegionModule #region ISharedRegionModule
public void Initialise(IConfigSource config) public void Initialise(IConfigSource config)
{ {
m_Interval = Util.GetConfigVarFromSections<int>(config, "Interval", new string[] { "ServiceThrottle" }, 2000);
m_timer = new System.Timers.Timer(); m_timer = new System.Timers.Timer();
m_timer.AutoReset = false; m_timer.AutoReset = false;
m_timer.Enabled = true; m_timer.Enabled = true;
@ -131,7 +134,7 @@ namespace OpenSim.Region.CoreModules.Framework
{ {
if (!m_timer.Enabled) if (!m_timer.Enabled)
{ {
m_timer.Interval = 1000; m_timer.Interval = m_Interval;
m_timer.Enabled = true; m_timer.Enabled = true;
m_timer.Start(); m_timer.Start();
} }