diff options
author | Justin Clarke Casey | 2009-02-03 18:06:24 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-03 18:06:24 +0000 |
commit | 35f9f2545d6f39ac9ac850fc7fc5dc21da80c7c2 (patch) | |
tree | a56f0aa9c066c52da15baf3a51d2dd33310a80ff /OpenSim/Region/Environment/Scenes | |
parent | * minor: remove some pointless assignments in SOG.Copy() that had already bee... (diff) | |
download | opensim-SC_OLD-35f9f2545d6f39ac9ac850fc7fc5dc21da80c7c2.zip opensim-SC_OLD-35f9f2545d6f39ac9ac850fc7fc5dc21da80c7c2.tar.gz opensim-SC_OLD-35f9f2545d6f39ac9ac850fc7fc5dc21da80c7c2.tar.bz2 opensim-SC_OLD-35f9f2545d6f39ac9ac850fc7fc5dc21da80c7c2.tar.xz |
* Lock parts while they're being duplicated to prevent possible race conditions with other parts changers
* This shouldn't provoke any deadlocks since the callers aren't taking any other locks beforehand
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index d026180..c3e3dfc 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1392,8 +1392,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1392 | SetRootPartOwner(m_rootPart, cAgentID, cGroupID); | 1392 | SetRootPartOwner(m_rootPart, cAgentID, cGroupID); |
1393 | m_rootPart.ScheduleFullUpdate(); | 1393 | m_rootPart.ScheduleFullUpdate(); |
1394 | } | 1394 | } |
1395 | |||
1396 | List<SceneObjectPart> partList; | ||
1395 | 1397 | ||
1396 | List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values); | 1398 | lock (m_parts) |
1399 | { | ||
1400 | partList = new List<SceneObjectPart>(m_parts.Values); | ||
1401 | } | ||
1402 | |||
1397 | partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2) | 1403 | partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2) |
1398 | { | 1404 | { |
1399 | return p1.LinkNum.CompareTo(p2.LinkNum); | 1405 | return p1.LinkNum.CompareTo(p2.LinkNum); |