From fb26d32a5c1320e97c9288326ebe402658a0a1c7 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 4 Dec 2012 22:33:25 +0000
Subject: minor: Put Scene.PhysicsRequestAsset() into standard C# xml format.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 1ad5edd..cca295c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5638,10 +5638,17 @@ namespace OpenSim.Region.Framework.Scenes
return m_SpawnPoint - 1;
}
- // Wrappers to get physics modules retrieve assets. Has to be done this way
- // because we can't assign the asset service to physics directly - at the
- // time physics are instantiated it's not registered but it will be by
- // the time the first prim exists.
+ ///
+ /// Wrappers to get physics modules retrieve assets.
+ ///
+ ///
+ /// Has to be done this way
+ /// because we can't assign the asset service to physics directly - at the
+ /// time physics are instantiated it's not registered but it will be by
+ /// the time the first prim exists.
+ ///
+ ///
+ ///
public void PhysicsRequestAsset(UUID assetID, AssetReceivedDelegate callback)
{
AssetService.Get(assetID.ToString(), callback, PhysicsAssetReceived);
--
cgit v1.1
From 0568c76a8801408665730702c97717d3c05cfe4d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 7 Dec 2012 00:47:04 +0000
Subject: Use a thread abort safe version of OpenMetaverse.DoubleDictionary
with the aim of avoiding OpenSimulator problems due to script thread aborts.
When an object is removed, its scripts are stopped and then the thread running them is aborted if stop takes too long.
However, it appears that aborting a thread at just the wrong moment when it is obtaining a ReaderWriterLockSlim lock can leave this lock in an inconsistent state.
One symptom of this is that mono leaps to 100% cpu and a vm thread dump reveals lots of threads waiting for a ReaderWriterLockSlim lock without any thread actually holding it.
This is probably the same problem as encountered originally in commit 12cebb12
This commit looks to plaster this problem by putting lock obtaining methods inside finally blocks which should be uninterruptible by thread aborts.
---
OpenSim/Region/Framework/Scenes/EntityManager.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/EntityManager.cs b/OpenSim/Region/Framework/Scenes/EntityManager.cs
index b788a3c..7181313 100644
--- a/OpenSim/Region/Framework/Scenes/EntityManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EntityManager.cs
@@ -31,6 +31,7 @@ using System.Collections.Generic;
using System.Reflection;
using log4net;
using OpenMetaverse;
+using OpenSim.Framework;
namespace OpenSim.Region.Framework.Scenes
{
@@ -38,7 +39,8 @@ namespace OpenSim.Region.Framework.Scenes
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
- private readonly DoubleDictionary m_entities = new DoubleDictionary();
+ private readonly DoubleDictionaryThreadAbortSafe m_entities
+ = new DoubleDictionaryThreadAbortSafe();
public int Count
{
--
cgit v1.1