aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-08-26 18:52:09 +0100
committerJustin Clark-Casey (justincc)2014-08-26 18:52:09 +0100
commitb1ff78f4d8265dbb3e8f5bc1d1c9cfad284f7ef3 (patch)
tree92925eec9cd2b4404b9f1d24e4c0cb4f578bb81d /OpenSim/Region/Framework
parentRemove race conditions from where SP.AbsolutePosition could change between th... (diff)
downloadopensim-SC_OLD-b1ff78f4d8265dbb3e8f5bc1d1c9cfad284f7ef3.zip
opensim-SC_OLD-b1ff78f4d8265dbb3e8f5bc1d1c9cfad284f7ef3.tar.gz
opensim-SC_OLD-b1ff78f4d8265dbb3e8f5bc1d1c9cfad284f7ef3.tar.bz2
opensim-SC_OLD-b1ff78f4d8265dbb3e8f5bc1d1c9cfad284f7ef3.tar.xz
Don't allow update timer to invoke another scene update if the previous is still active.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index de89cc2..e87500a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1443,8 +1443,15 @@ namespace OpenSim.Region.Framework.Scenes
1443 } 1443 }
1444 } 1444 }
1445 1445
1446 private volatile bool m_isTimerUpdateRunning;
1447
1446 private void Update(object sender, ElapsedEventArgs e) 1448 private void Update(object sender, ElapsedEventArgs e)
1447 { 1449 {
1450 if (m_isTimerUpdateRunning)
1451 return;
1452
1453 m_isTimerUpdateRunning = true;
1454
1448 // If the last frame did not complete on time, then immediately start the next update on the same thread 1455 // If the last frame did not complete on time, then immediately start the next update on the same thread
1449 // and ignore further timed updates until we have a frame that had spare time. 1456 // and ignore further timed updates until we have a frame that had spare time.
1450 while (!Update(1) && Active) {} 1457 while (!Update(1) && Active) {}
@@ -1455,6 +1462,8 @@ namespace OpenSim.Region.Framework.Scenes
1455 m_sceneUpdateTimer = null; 1462 m_sceneUpdateTimer = null;
1456 m_isRunning = false; 1463 m_isRunning = false;
1457 } 1464 }
1465
1466 m_isTimerUpdateRunning = false;
1458 } 1467 }
1459 1468
1460 private void Maintenance() 1469 private void Maintenance()