diff options
author | Justin Clark-Casey (justincc) | 2012-03-23 01:21:43 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-23 01:21:43 +0000 |
commit | 18b3f1132eeb28e51d84e028e4fd69048150ccb7 (patch) | |
tree | ed7bdee231a18facf64a414f36b2554c6c01c07e /OpenSim/Region/Framework/Scenes | |
parent | Fix build break (diff) | |
download | opensim-SC-18b3f1132eeb28e51d84e028e4fd69048150ccb7.zip opensim-SC-18b3f1132eeb28e51d84e028e4fd69048150ccb7.tar.gz opensim-SC-18b3f1132eeb28e51d84e028e4fd69048150ccb7.tar.bz2 opensim-SC-18b3f1132eeb28e51d84e028e4fd69048150ccb7.tar.xz |
Rename Scene.StartTimer() to Start() - this method no longer uses a timer. Comment out more effectively unused old heartbeat code.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 49 |
1 files changed, 25 insertions, 24 deletions
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 | |||
211 | /// </summary> | 211 | /// </summary> |
212 | private bool m_cleaningTemps = false; | 212 | private bool m_cleaningTemps = false; |
213 | 213 | ||
214 | private Object m_heartbeatLock = new Object(); | 214 | // private Object m_heartbeatLock = new Object(); |
215 | 215 | ||
216 | // TODO: Possibly stop other classes being able to manipulate this directly. | 216 | // TODO: Possibly stop other classes being able to manipulate this directly. |
217 | private SceneGraph m_sceneGraph; | 217 | private SceneGraph m_sceneGraph; |
@@ -1159,9 +1159,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | /// <summary> | 1161 | /// <summary> |
1162 | /// Start the scene loop | 1162 | /// Start the scene |
1163 | /// </summary> | 1163 | /// </summary> |
1164 | public void StartTimer() | 1164 | public void Start() |
1165 | { | 1165 | { |
1166 | // m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName); | 1166 | // m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName); |
1167 | 1167 | ||
@@ -1206,33 +1206,34 @@ namespace OpenSim.Region.Framework.Scenes | |||
1206 | /// </summary> | 1206 | /// </summary> |
1207 | private void Heartbeat() | 1207 | private void Heartbeat() |
1208 | { | 1208 | { |
1209 | if (!Monitor.TryEnter(m_heartbeatLock)) | 1209 | // if (!Monitor.TryEnter(m_heartbeatLock)) |
1210 | { | 1210 | // { |
1211 | Watchdog.RemoveThread(); | 1211 | // Watchdog.RemoveThread(); |
1212 | return; | 1212 | // return; |
1213 | } | 1213 | // } |
1214 | 1214 | ||
1215 | try | 1215 | // try |
1216 | { | 1216 | // { |
1217 | m_eventManager.TriggerOnRegionStarted(this); | 1217 | |
1218 | m_eventManager.TriggerOnRegionStarted(this); | ||
1218 | 1219 | ||
1219 | // The first frame can take a very long time due to physics actors being added on startup. Therefore, | 1220 | // The first frame can take a very long time due to physics actors being added on startup. Therefore, |
1220 | // don't turn on the watchdog alarm for this thread until the second frame, in order to prevent false | 1221 | // don't turn on the watchdog alarm for this thread until the second frame, in order to prevent false |
1221 | // alarms for scenes with many objects. | 1222 | // alarms for scenes with many objects. |
1222 | Update(1); | 1223 | Update(1); |
1223 | Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; | 1224 | Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; |
1224 | 1225 | ||
1225 | while (!shuttingdown) | 1226 | while (!shuttingdown) |
1226 | Update(-1); | 1227 | Update(-1); |
1227 | 1228 | ||
1228 | // m_lastUpdate = Util.EnvironmentTickCount(); | 1229 | // m_lastUpdate = Util.EnvironmentTickCount(); |
1229 | // m_firstHeartbeat = false; | 1230 | // m_firstHeartbeat = false; |
1230 | } | 1231 | // } |
1231 | finally | 1232 | // finally |
1232 | { | 1233 | // { |
1233 | Monitor.Pulse(m_heartbeatLock); | 1234 | // Monitor.Pulse(m_heartbeatLock); |
1234 | Monitor.Exit(m_heartbeatLock); | 1235 | // Monitor.Exit(m_heartbeatLock); |
1235 | } | 1236 | // } |
1236 | 1237 | ||
1237 | Watchdog.RemoveThread(); | 1238 | Watchdog.RemoveThread(); |
1238 | } | 1239 | } |