* 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.
This commit is contained in:
Adam Frisby
2008-11-24 15:14:33 +00:00
parent 2305ef61a5
commit 2a8ff937d5
3 changed files with 8 additions and 32 deletions

View File

@@ -244,21 +244,6 @@ namespace OpenSim.Region.Environment.Scenes
// set { m_sceneGraph.SceneObjects = value; }
// }
/**
/// <summary>
/// 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()
/// </summary>
public Dictionary<UUID, EntityBase> 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();
}
}
}