aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
authorCasperW2009-12-06 17:23:07 +0100
committerCasperW2009-12-06 17:23:07 +0100
commit172e2f4e7609c278d02ad83ca207fd79624db587 (patch)
tree37c6d737e3fb8b3611efd4fa5dbaf38572128e51 /OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
parentChange EntityManager to use RWlocks (diff)
downloadopensim-SC-172e2f4e7609c278d02ad83ca207fd79624db587.zip
opensim-SC-172e2f4e7609c278d02ad83ca207fd79624db587.tar.gz
opensim-SC-172e2f4e7609c278d02ad83ca207fd79624db587.tar.bz2
opensim-SC-172e2f4e7609c278d02ad83ca207fd79624db587.tar.xz
Fix to existing ReaderWriterLockSlim implementations
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 49c69ab..184af19 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -150,7 +150,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
150 } 150 }
151 else 151 else
152 { 152 {
153 m_scriptsLock.ExitReadLock(); 153 if (m_scriptsLock.RecursiveReadCount > 0)
154 {
155 m_scriptsLock.ExitReadLock();
156 }
154 } 157 }
155 } 158 }
156 private void lockScriptsForWrite(bool locked) 159 private void lockScriptsForWrite(bool locked)
@@ -179,7 +182,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
179 } 182 }
180 else 183 else
181 { 184 {
182 m_scriptsLock.ExitWriteLock(); 185 if (m_scriptsLock.RecursiveWriteCount > 0)
186 {
187 m_scriptsLock.ExitWriteLock();
188 }
183 } 189 }
184 } 190 }
185 191