diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index df9b163..5f18a44 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> |