From 2a8ff937d513abbd84a96cbfdbe74bc710b60e6a Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Mon, 24 Nov 2008 15:14:33 +0000 Subject: * Removed more locks on Entities * Entities should now in theory be lock-free externally. * Other properties may cause blocking however[?]. * ScenePresence maintains separate locks so isn't fixed by this commit. --- OpenSim/Region/Environment/Scenes/Scene.cs | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 55e8634..c20c718 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -244,21 +244,6 @@ namespace OpenSim.Region.Environment.Scenes // set { m_sceneGraph.SceneObjects = value; } // } - /** - /// - /// The dictionary of all entities in this scene. The contents of this dictionary may be changed at any time. - /// If you wish to add or remove entities, please use the appropriate method for that entity rather than - /// editing this dictionary directly. - /// - /// If you want a list of entities where the list itself is guaranteed not to change, please use - /// GetEntities() - /// - public Dictionary Entities - { - get { return m_sceneGraph.Entities; } - set { m_sceneGraph.Entities = value; } - } - */ public EntityManager Entities { get { return m_sceneGraph.Entities; } @@ -609,14 +594,11 @@ namespace OpenSim.Region.Environment.Scenes if (ScriptEngine) { m_log.Info("Stopping all Scripts in Scene"); - lock (Entities) + foreach (EntityBase ent in Entities) { - foreach (EntityBase ent in Entities) + if (ent is SceneObjectGroup) { - if (ent is SceneObjectGroup) - { - ((SceneObjectGroup)ent).RemoveScriptInstances(); - } + ((SceneObjectGroup) ent).RemoveScriptInstances(); } } } -- cgit v1.1