mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Start locking entire add/remove operations on an IScenePresence.AttachmentsSyncLock object
Attach and detach packets are processed asynchronously when received from a viewer. Bugs like http://opensimulator.org/mantis/view.php?id=5644 indicate that in some situations (such as attaching/detaching entire folders of objects at once), there are race conditions between these threads. Since multiple data structures need to be updated on attach/detach, it's not enough to lock the individual collections. Therefore, this commit introduces a new IScenePresence.AttachmentsSyncLock which add/remove operations lock on.
This commit is contained in:
@@ -87,6 +87,15 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
/// <returns>The scene object that was attached. Null if the scene object could not be found</returns>
|
||||
ISceneEntity RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt);
|
||||
|
||||
/// <summary>
|
||||
/// Rez an attachment from user inventory and change inventory status to match.
|
||||
/// </summary>
|
||||
/// <param name="sp"></param>
|
||||
/// <param name="itemID"></param>
|
||||
/// <param name="AttachmentPt"></param>
|
||||
/// <returns>The scene object that was attached. Null if the scene object could not be found</returns>
|
||||
ISceneEntity RezSingleAttachmentFromInventory(ScenePresence sp, UUID itemID, uint AttachmentPt);
|
||||
|
||||
/// <summary>
|
||||
/// Rez multiple attachments from a user's inventory
|
||||
/// </summary>
|
||||
|
||||
@@ -60,6 +60,14 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
/// </remarks>
|
||||
AvatarAppearance Appearance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The AttachmentsModule synchronizes on this to avoid race conditions between commands to add and remove attachments.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// All add and remove attachment operations must synchronize on this for the lifetime of their operations.
|
||||
/// </remarks>
|
||||
Object AttachmentsSyncLock { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The scene objects attached to this avatar.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user