From d1147136946daf14724183b3191119be44ff8b16 Mon Sep 17 00:00:00 2001
From: CasperW
Date: Tue, 24 Nov 2009 18:02:12 +0100
Subject: Drop all locking of part.TaskInventory in favour of a
ReaderWriterLockSlim lock handler. This gives us: - Faster prim inventory
actions. Multiple threads can read at once. - Fixes the known prim inventory
thread locks - In the event of a thread lock occurring, it will usually self
heal after sixty seconds with an error message in the console
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 38 ++++++++++++----------
1 file changed, 21 insertions(+), 17 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index cdec135..bbece2f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -389,12 +389,16 @@ namespace OpenSim.Region.Framework.Scenes
}
///
- /// Access should be via Inventory directly - this property temporarily remains for xml serialization purposes
+ /// Get the inventory list
///
public TaskInventoryDictionary TaskInventory
{
- get { return m_inventory.Items; }
- set { m_inventory.Items = value; }
+ get {
+ return m_inventory.Items;
+ }
+ set {
+ m_inventory.Items = value;
+ }
}
public uint ObjectFlags
@@ -2101,17 +2105,18 @@ namespace OpenSim.Region.Framework.Scenes
//Trys to fetch sound id from prim's inventory.
//Prim's inventory doesn't support non script items yet
- lock (TaskInventory)
+ TaskInventory.LockItemsForRead(true);
+
+ foreach (KeyValuePair item in TaskInventory)
{
- foreach (KeyValuePair item in TaskInventory)
+ if (item.Value.Name == sound)
{
- if (item.Value.Name == sound)
- {
- soundID = item.Value.ItemID;
- break;
- }
+ soundID = item.Value.ItemID;
+ break;
}
}
+
+ TaskInventory.LockItemsForRead(false);
}
List avatarts = m_parentGroup.Scene.GetAvatars();
@@ -2457,17 +2462,16 @@ namespace OpenSim.Region.Framework.Scenes
if (!UUID.TryParse(sound, out soundID))
{
// search sound file from inventory
- lock (TaskInventory)
+ TaskInventory.LockItemsForRead(true);
+ foreach (KeyValuePair item in TaskInventory)
{
- foreach (KeyValuePair item in TaskInventory)
+ if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound)
{
- if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound)
- {
- soundID = item.Value.ItemID;
- break;
- }
+ soundID = item.Value.ItemID;
+ break;
}
}
+ TaskInventory.LockItemsForRead(false);
}
if (soundID == UUID.Zero)
--
cgit v1.1
From 9d63f90467dbc60622a49f564a56fdd20de90f51 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Thu, 26 Nov 2009 17:03:09 +0000
Subject: Remove the old (Remoting) region crossing code. Fix the new code to
pass script state and assembly again properly. Reintroduce respecting tht
TrustBinaries flag. Changes the interregion protocol! No version bump because
it was broken anyway, so with a version mismatch it will simply stay broken,
but not crash. Region corssing still doesn't work because there is still
monkey business with both rezzed prims being pushed across a border and
attached prims when walking across a border. Teleport is untested by may
work.
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 5 -----
1 file changed, 5 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 6f1b458..b6916f2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3797,10 +3797,5 @@ namespace OpenSim.Region.Framework.Scenes
Inventory.ApplyNextOwnerPermissions();
}
-
- public bool CanBeDeleted()
- {
- return Inventory.CanBeDeleted();
- }
}
}
--
cgit v1.1