mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
* 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
This commit is contained in:
@@ -1392,8 +1392,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
SetRootPartOwner(m_rootPart, cAgentID, cGroupID);
|
||||
m_rootPart.ScheduleFullUpdate();
|
||||
}
|
||||
|
||||
List<SceneObjectPart> partList;
|
||||
|
||||
List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values);
|
||||
lock (m_parts)
|
||||
{
|
||||
partList = new List<SceneObjectPart>(m_parts.Values);
|
||||
}
|
||||
|
||||
partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2)
|
||||
{
|
||||
return p1.LinkNum.CompareTo(p2.LinkNum);
|
||||
|
||||
Reference in New Issue
Block a user