diff options
author | Justin Clarke Casey | 2009-02-20 14:04:29 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-20 14:04:29 +0000 |
commit | 01f70de2ea562f78991084be01a83295f8f2be0b (patch) | |
tree | ff43706bf83039ce9d9c6c5bfffe56f2df1d1c86 /OpenSim/Region/Framework/Scenes/Hypergrid | |
parent | Revert previous commit (diff) | |
download | opensim-SC_OLD-01f70de2ea562f78991084be01a83295f8f2be0b.zip opensim-SC_OLD-01f70de2ea562f78991084be01a83295f8f2be0b.tar.gz opensim-SC_OLD-01f70de2ea562f78991084be01a83295f8f2be0b.tar.bz2 opensim-SC_OLD-01f70de2ea562f78991084be01a83295f8f2be0b.tar.xz |
* 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
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Hypergrid')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs index 1a3c4c8..f7db908 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs | |||
@@ -226,9 +226,12 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid | |||
226 | { | 226 | { |
227 | TaskInventoryDictionary tinv = sog.RootPart.TaskInventory; | 227 | TaskInventoryDictionary tinv = sog.RootPart.TaskInventory; |
228 | 228 | ||
229 | foreach (TaskInventoryItem titem in tinv.Values) | 229 | lock (tinv) |
230 | { | 230 | { |
231 | uuids.Add(titem.AssetID, (InventoryType)titem.Type == InventoryType.Texture); | 231 | foreach (TaskInventoryItem titem in tinv.Values) |
232 | { | ||
233 | uuids.Add(titem.AssetID, (InventoryType)titem.Type == InventoryType.Texture); | ||
234 | } | ||
232 | } | 235 | } |
233 | } | 236 | } |
234 | 237 | ||