aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2009-10-06 17:44:59 +0100
committerMelanie2009-10-06 17:44:59 +0100
commit0374f1b144f3faf35da39e3925e8abd4b2a8bd04 (patch)
tree456d3d532c70d32564d35fc3cb9bbc81bdf08b2e /OpenSim/Region/Framework
parentMake sure that keys exist in arrays before trying to access them. (diff)
parentCorrected words in error message. (diff)
downloadopensim-SC_OLD-0374f1b144f3faf35da39e3925e8abd4b2a8bd04.zip
opensim-SC_OLD-0374f1b144f3faf35da39e3925e8abd4b2a8bd04.tar.gz
opensim-SC_OLD-0374f1b144f3faf35da39e3925e8abd4b2a8bd04.tar.bz2
opensim-SC_OLD-0374f1b144f3faf35da39e3925e8abd4b2a8bd04.tar.xz
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index c06a58f..9418e3d 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -137,6 +137,8 @@ namespace OpenSim.Region.Framework.Scenes
137 protected IAssetService m_AssetService = null; 137 protected IAssetService m_AssetService = null;
138 protected IAuthorizationService m_AuthorizationService = null; 138 protected IAuthorizationService m_AuthorizationService = null;
139 139
140 private Object m_heartbeatLock = new Object();
141
140 public IAssetService AssetService 142 public IAssetService AssetService
141 { 143 {
142 get 144 get
@@ -942,6 +944,9 @@ namespace OpenSim.Region.Framework.Scenes
942 /// <param name="e"></param> 944 /// <param name="e"></param>
943 private void Heartbeat(object sender) 945 private void Heartbeat(object sender)
944 { 946 {
947 if (!Monitor.TryEnter(m_heartbeatLock))
948 return;
949
945 try 950 try
946 { 951 {
947 Update(); 952 Update();
@@ -952,6 +957,11 @@ namespace OpenSim.Region.Framework.Scenes
952 catch (ThreadAbortException) 957 catch (ThreadAbortException)
953 { 958 {
954 } 959 }
960 finally
961 {
962 Monitor.Pulse(m_heartbeatLock);
963 Monitor.Exit(m_heartbeatLock);
964 }
955 } 965 }
956 966
957 /// <summary> 967 /// <summary>
@@ -962,6 +972,12 @@ namespace OpenSim.Region.Framework.Scenes
962 int maintc = 0; 972 int maintc = 0;
963 while (!shuttingdown) 973 while (!shuttingdown)
964 { 974 {
975//#if DEBUG
976// int w = 0, io = 0;
977// ThreadPool.GetAvailableThreads(out w, out io);
978// if ((w < 10) || (io < 10))
979// m_log.DebugFormat("[WARNING]: ThreadPool reaching exhaustion. workers = {0}; io = {1}", w, io);
980//#endif
965 maintc = Environment.TickCount; 981 maintc = Environment.TickCount;
966 982
967 TimeSpan SinceLastFrame = DateTime.Now - m_lastupdate; 983 TimeSpan SinceLastFrame = DateTime.Now - m_lastupdate;