From 01f70de2ea562f78991084be01a83295f8f2be0b Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Fri, 20 Feb 2009 14:04:29 +0000
Subject: * Consistently lock part.TaskInventory as pointed out in
http://opensimulator.org/mantis/view.php?id=3159 * Not locking causes
enumeration exceptions as described in this matis * part.TaskInventory needs
to be locked for every access as it's a dictionary * Extra locking will
hopefully not cause any major issues - in places where the enumeration of the
dictionary performs other lock or long running operations, the dictionary is
cloned instead
---
OpenSim/Framework/TaskInventoryDictionary.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/TaskInventoryDictionary.cs b/OpenSim/Framework/TaskInventoryDictionary.cs
index 4a1aa17..defac23 100644
--- a/OpenSim/Framework/TaskInventoryDictionary.cs
+++ b/OpenSim/Framework/TaskInventoryDictionary.cs
@@ -36,9 +36,9 @@ namespace OpenSim.Framework
{
///
/// A dictionary for task inventory.
- ///
- /// This class is not thread safe. Callers must synchronize on Dictionary methods.
///
+ /// This class is not thread safe. Callers must synchronize on Dictionary methods or Clone() this object before
+ /// iterating over it.
public class TaskInventoryDictionary : Dictionary,
ICloneable, IXmlSerializable
{
--
cgit v1.1