* Remove what should be unnecessary locking of GetScenePresences()

* May help with mantis 1434 though I doubt it
0.6.0-stable
Justin Clarke Casey 2008-06-03 08:11:04 +00:00
parent 61e2254be2
commit f45fa84905
1 changed files with 3 additions and 9 deletions

View File

@ -627,19 +627,13 @@ namespace OpenSim.Region.Environment.Scenes
#region Get Methods #region Get Methods
/// <summary> /// <summary>
/// Request a List of all m_scenePresences in this World /// Request a List of all scene presences in this scene. This returns a copy of the original list, so no
/// locking is required to iterate over it.
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
protected internal List<ScenePresence> GetScenePresences() protected internal List<ScenePresence> GetScenePresences()
{ {
List<ScenePresence> result; return new List<ScenePresence>(ScenePresences.Values);
lock (ScenePresences)
{
result = new List<ScenePresence>(ScenePresences.Values);
}
return result;
} }
protected internal List<ScenePresence> GetAvatars() protected internal List<ScenePresence> GetAvatars()