aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-06 12:15:24 -0700
committerJohn Hurliman2009-10-06 12:15:24 -0700
commitfa6027aa09190ce50cfabcd3092836f21c99228c (patch)
treee0ee78f308c1933f6d3aa9c6e80c2fcf4a75d6a2 /OpenSim/Region/Framework
parent* Added missing references to prebuild.xml and commented out the LindenUDP te... (diff)
parent* Removed verbose debug message (diff)
downloadopensim-SC_OLD-fa6027aa09190ce50cfabcd3092836f21c99228c.zip
opensim-SC_OLD-fa6027aa09190ce50cfabcd3092836f21c99228c.tar.gz
opensim-SC_OLD-fa6027aa09190ce50cfabcd3092836f21c99228c.tar.bz2
opensim-SC_OLD-fa6027aa09190ce50cfabcd3092836f21c99228c.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into htb-throttle
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 30c2223..b25be8e 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
@@ -940,6 +942,9 @@ namespace OpenSim.Region.Framework.Scenes
940 /// <param name="e"></param> 942 /// <param name="e"></param>
941 private void Heartbeat(object sender) 943 private void Heartbeat(object sender)
942 { 944 {
945 if (!Monitor.TryEnter(m_heartbeatLock))
946 return;
947
943 try 948 try
944 { 949 {
945 Update(); 950 Update();
@@ -950,6 +955,11 @@ namespace OpenSim.Region.Framework.Scenes
950 catch (ThreadAbortException) 955 catch (ThreadAbortException)
951 { 956 {
952 } 957 }
958 finally
959 {
960 Monitor.Pulse(m_heartbeatLock);
961 Monitor.Exit(m_heartbeatLock);
962 }
953 } 963 }
954 964
955 /// <summary> 965 /// <summary>
@@ -960,6 +970,12 @@ namespace OpenSim.Region.Framework.Scenes
960 int maintc = 0; 970 int maintc = 0;
961 while (!shuttingdown) 971 while (!shuttingdown)
962 { 972 {
973//#if DEBUG
974// int w = 0, io = 0;
975// ThreadPool.GetAvailableThreads(out w, out io);
976// if ((w < 10) || (io < 10))
977// m_log.DebugFormat("[WARNING]: ThreadPool reaching exhaustion. workers = {0}; io = {1}", w, io);
978//#endif
963 maintc = Environment.TickCount; 979 maintc = Environment.TickCount;
964 980
965 TimeSpan SinceLastFrame = DateTime.Now - m_lastupdate; 981 TimeSpan SinceLastFrame = DateTime.Now - m_lastupdate;