diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 11 |
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() |