Improve liveness by operating on list copies of SOG.Children where appropriate

This commit is contained in:
Justin Clark-Casey (justincc)
2010-08-28 00:40:33 +01:00
parent 4f9931ec10
commit 1c0b4457cd
9 changed files with 386 additions and 373 deletions

View File

@@ -164,16 +164,17 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectGroup sog = ent as SceneObjectGroup;
List<SceneObjectPart> partList = null;
lock (sog.Children)
partList = new List<SceneObjectPart>(sog.Children.Values);
foreach (SceneObjectPart part in partList)
{
foreach (KeyValuePair<UUID, SceneObjectPart> child in (sog.Children))
if (part.LocalId == primLocalID)
{
if (child.Value.LocalId == primLocalID)
{
child.Value.GetProperties(remoteClient);
foundPrim = true;
break;
}
part.GetProperties(remoteClient);
foundPrim = true;
break;
}
}