Rename Scene.StartTimer() to Start() - this method no longer uses a timer. Comment out more effectively unused old heartbeat code.
parent
24b5fb8523
commit
47fe6170b2
|
@ -424,7 +424,7 @@ namespace OpenSim
|
|||
|
||||
mscene = scene;
|
||||
|
||||
scene.StartTimer();
|
||||
scene.Start();
|
||||
|
||||
scene.StartScripts();
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
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;
|
||||
|
@ -1164,9 +1164,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start the timer which triggers regular scene updates
|
||||
/// Start the scene
|
||||
/// </summary>
|
||||
public void StartTimer()
|
||||
public void Start()
|
||||
{
|
||||
// m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName);
|
||||
|
||||
|
@ -1211,14 +1211,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
private void Heartbeat()
|
||||
{
|
||||
if (!Monitor.TryEnter(m_heartbeatLock))
|
||||
{
|
||||
Watchdog.RemoveThread();
|
||||
return;
|
||||
}
|
||||
// if (!Monitor.TryEnter(m_heartbeatLock))
|
||||
// {
|
||||
// Watchdog.RemoveThread();
|
||||
// return;
|
||||
// }
|
||||
|
||||
// try
|
||||
// {
|
||||
|
||||
try
|
||||
{
|
||||
m_eventManager.TriggerOnRegionStarted(this);
|
||||
|
||||
// The first frame can take a very long time due to physics actors being added on startup. Therefore,
|
||||
|
@ -1232,12 +1233,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
// 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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue