mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
Make SP.Attachments available as sp.GetAttachments() instead.
The approach here, as in other parts of OpenSim, is to return a copy of the list rather than the attachments list itself This prevents callers from forgetting to lock the list when they read it, as was happening in various parts of the codebase. It also improves liveness. This might improve attachment anomolies when performing region crossings.
This commit is contained in:
@@ -58,10 +58,13 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
/// <summary>
|
||||
/// The scene objects attached to this avatar.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A copy of the list.
|
||||
/// </returns>
|
||||
/// <remarks>
|
||||
/// Do not change this list directly - use methods such as
|
||||
/// AddAttachment() and RemoveAttachment(). Lock this list when performing any read operations upon it.
|
||||
/// AddAttachment() and RemoveAttachment().
|
||||
/// </remarks>
|
||||
List<SceneObjectGroup> Attachments { get; }
|
||||
List<SceneObjectGroup> GetAttachments();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user