Rename Scene.StartTimer() to Start() - this method no longer uses a timer. Comment out more effectively unused old heartbeat code.
parent
4ee8b3e23e
commit
18b3f1132e
|
@ -430,7 +430,7 @@ namespace OpenSim
|
||||||
|
|
||||||
mscene = scene;
|
mscene = scene;
|
||||||
|
|
||||||
scene.StartTimer();
|
scene.Start();
|
||||||
|
|
||||||
scene.StartScripts();
|
scene.StartScripts();
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private bool m_cleaningTemps = false;
|
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.
|
// TODO: Possibly stop other classes being able to manipulate this directly.
|
||||||
private SceneGraph m_sceneGraph;
|
private SceneGraph m_sceneGraph;
|
||||||
|
@ -1159,9 +1159,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Start the scene loop
|
/// Start the scene
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void StartTimer()
|
public void Start()
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName);
|
// m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName);
|
||||||
|
|
||||||
|
@ -1206,33 +1206,34 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void Heartbeat()
|
private void Heartbeat()
|
||||||
{
|
{
|
||||||
if (!Monitor.TryEnter(m_heartbeatLock))
|
// if (!Monitor.TryEnter(m_heartbeatLock))
|
||||||
{
|
// {
|
||||||
Watchdog.RemoveThread();
|
// Watchdog.RemoveThread();
|
||||||
return;
|
// 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,
|
m_eventManager.TriggerOnRegionStarted(this);
|
||||||
// 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)
|
// The first frame can take a very long time due to physics actors being added on startup. Therefore,
|
||||||
Update(-1);
|
// 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);
|
||||||
|
|
||||||
// m_lastUpdate = Util.EnvironmentTickCount();
|
// m_lastUpdate = Util.EnvironmentTickCount();
|
||||||
// m_firstHeartbeat = false;
|
// m_firstHeartbeat = false;
|
||||||
}
|
// }
|
||||||
finally
|
// finally
|
||||||
{
|
// {
|
||||||
Monitor.Pulse(m_heartbeatLock);
|
// Monitor.Pulse(m_heartbeatLock);
|
||||||
Monitor.Exit(m_heartbeatLock);
|
// Monitor.Exit(m_heartbeatLock);
|
||||||
}
|
// }
|
||||||
|
|
||||||
Watchdog.RemoveThread();
|
Watchdog.RemoveThread();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue