diff options
author | CasperW | 2009-12-06 17:23:07 +0100 |
---|---|---|
committer | CasperW | 2009-12-06 17:23:07 +0100 |
commit | 172e2f4e7609c278d02ad83ca207fd79624db587 (patch) | |
tree | 37c6d737e3fb8b3611efd4fa5dbaf38572128e51 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | Change EntityManager to use RWlocks (diff) | |
download | opensim-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 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 93888f1..eacd219 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -126,7 +126,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
126 | } | 126 | } |
127 | else | 127 | else |
128 | { | 128 | { |
129 | m_partsLock.ExitReadLock(); | 129 | if (m_partsLock.RecursiveReadCount > 0) |
130 | { | ||
131 | m_partsLock.ExitReadLock(); | ||
132 | } | ||
130 | } | 133 | } |
131 | } | 134 | } |
132 | public void lockPartsForWrite(bool locked) | 135 | public void lockPartsForWrite(bool locked) |
@@ -155,7 +158,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
155 | } | 158 | } |
156 | else | 159 | else |
157 | { | 160 | { |
158 | m_partsLock.ExitWriteLock(); | 161 | if (m_partsLock.RecursiveWriteCount > 0) |
162 | { | ||
163 | m_partsLock.ExitWriteLock(); | ||
164 | } | ||
159 | } | 165 | } |
160 | } | 166 | } |
161 | 167 | ||