From 18b3f1132eeb28e51d84e028e4fd69048150ccb7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 23 Mar 2012 01:21:43 +0000 Subject: Rename Scene.StartTimer() to Start() - this method no longer uses a timer. Comment out more effectively unused old heartbeat code. --- OpenSim/Region/Application/OpenSimBase.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 49 ++++++++++++++++--------------- 2 files changed, 26 insertions(+), 25 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index c6956fc..484159c 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -430,7 +430,7 @@ namespace OpenSim mscene = scene; - scene.StartTimer(); + scene.Start(); scene.StartScripts(); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 8a4c6c9..d354ef0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -211,7 +211,7 @@ namespace OpenSim.Region.Framework.Scenes /// private bool m_cleaningTemps = false; - private Object m_heartbeatLock = new Object(); +// private Object m_heartbeatLock = new Object(); // TODO: Possibly stop other classes being able to manipulate this directly. private SceneGraph m_sceneGraph; @@ -1159,9 +1159,9 @@ namespace OpenSim.Region.Framework.Scenes } /// - /// Start the scene loop + /// Start the scene /// - public void StartTimer() + public void Start() { // m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName); @@ -1206,33 +1206,34 @@ namespace OpenSim.Region.Framework.Scenes /// private void Heartbeat() { - if (!Monitor.TryEnter(m_heartbeatLock)) - { - Watchdog.RemoveThread(); - return; - } +// if (!Monitor.TryEnter(m_heartbeatLock)) +// { +// Watchdog.RemoveThread(); +// return; +// } - try - { - m_eventManager.TriggerOnRegionStarted(this); +// try +// { + + m_eventManager.TriggerOnRegionStarted(this); - // The first frame can take a very long time due to physics actors being added on startup. Therefore, - // don't turn on the watchdog alarm for this thread until the second frame, in order to prevent false - // alarms for scenes with many objects. - Update(1); - Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; + // The first frame can take a very long time due to physics actors being added on startup. Therefore, + // don't turn on the watchdog alarm for this thread until the second frame, in order to prevent false + // alarms for scenes with many objects. + Update(1); + Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; - while (!shuttingdown) - Update(-1); + while (!shuttingdown) + Update(-1); // m_lastUpdate = Util.EnvironmentTickCount(); // m_firstHeartbeat = false; - } - finally - { - Monitor.Pulse(m_heartbeatLock); - Monitor.Exit(m_heartbeatLock); - } +// } +// finally +// { +// Monitor.Pulse(m_heartbeatLock); +// Monitor.Exit(m_heartbeatLock); +// } Watchdog.RemoveThread(); } -- cgit v1.1