First pass at cleaning up thread safety in EntityManager and SceneGraph

This commit is contained in:
John Hurliman
2010-09-10 12:04:12 -07:00
parent 9609faa8eb
commit dd277a0d02
25 changed files with 252 additions and 395 deletions

View File

@@ -436,7 +436,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// We can NOT use the dictionries here, as we are looking
// for an entity by the fromAssetID, which is NOT the prim UUID
List<EntityBase> detachEntities = m_scene.GetEntities();
EntityBase[] detachEntities = m_scene.GetEntities();
SceneObjectGroup group;
foreach (EntityBase entity in detachEntities)

View File

@@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
{
Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>();
List<EntityBase> entities = m_scene.GetEntities();
EntityBase[] entities = m_scene.GetEntities();
List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
/*

View File

@@ -794,7 +794,8 @@ namespace OpenSim.Region.CoreModules.World.Land
public void EventManagerOnParcelPrimCountUpdate()
{
ResetAllLandPrimCounts();
foreach (EntityBase obj in m_scene.Entities)
EntityBase[] entities = m_scene.Entities.GetEntities();
foreach (EntityBase obj in entities)
{
if (obj != null)
{

View File

@@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
{
string xmlstream = "<scene>";
List<EntityBase> EntityList = scene.GetEntities();
EntityBase[] EntityList = scene.GetEntities();
List<string> EntityXml = new List<string>();
foreach (EntityBase ent in EntityList)

View File

@@ -165,12 +165,12 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
return SceneXmlLoader.SaveGroupToXml2(grp);
}
public void SavePrimListToXml2(List<EntityBase> entityList, string fileName)
public void SavePrimListToXml2(EntityBase[] entityList, string fileName)
{
SceneXmlLoader.SavePrimListToXml2(entityList, fileName);
}
public void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max)
public void SavePrimListToXml2(EntityBase[] entityList, TextWriter stream, Vector3 min, Vector3 max)
{
SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max);
}

View File

@@ -212,7 +212,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
double[,] hm = whichScene.Heightmap.GetDoubles();
tc = Environment.TickCount;
m_log.Info("[MAPTILE]: Generating Maptile Step 2: Object Volume Profile");
List<EntityBase> objs = whichScene.GetEntities();
EntityBase[] objs = whichScene.GetEntities();
Dictionary<uint, DrawStruct> z_sort = new Dictionary<uint, DrawStruct>();
//SortedList<float, RectangleDrawStruct> z_sort = new SortedList<float, RectangleDrawStruct>();
List<float> z_sortheights = new List<float>();