aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-09-03 23:31:45 +0100
committerJustin Clark-Casey (justincc)2014-09-03 23:35:18 +0100
commitb08ab1e3754da4a2855bb77fca91dce01e9c2fae (patch)
treebd988acd43103f8b38fa7d6c1ccdef2c5c95f821
parentCleanup some unused code and configuration entries (diff)
downloadopensim-SC_OLD-b08ab1e3754da4a2855bb77fca91dce01e9c2fae.zip
opensim-SC_OLD-b08ab1e3754da4a2855bb77fca91dce01e9c2fae.tar.gz
opensim-SC_OLD-b08ab1e3754da4a2855bb77fca91dce01e9c2fae.tar.bz2
opensim-SC_OLD-b08ab1e3754da4a2855bb77fca91dce01e9c2fae.tar.xz
If BulletSim is running on its own threads, start this thread via the thread watchdog.
This allows us to see the presence of the permanent thread via the "show threads" console comand. Also adds the region name to the thread name.
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs11
-rw-r--r--prebuild.xml1
2 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index f7317c0..d3b2ad7 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -32,6 +32,7 @@ using System.Runtime.InteropServices;
32using System.Text; 32using System.Text;
33using System.Threading; 33using System.Threading;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Monitoring;
35using OpenSim.Region.Framework; 36using OpenSim.Region.Framework;
36using OpenSim.Region.CoreModules; 37using OpenSim.Region.CoreModules;
37using Logging = OpenSim.Region.CoreModules.Framework.Statistics.Logging; 38using Logging = OpenSim.Region.CoreModules.Framework.Statistics.Logging;
@@ -286,9 +287,13 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
286 if (BSParam.UseSeparatePhysicsThread) 287 if (BSParam.UseSeparatePhysicsThread)
287 { 288 {
288 // The physics simulation should happen independently of the heartbeat loop 289 // The physics simulation should happen independently of the heartbeat loop
289 m_physicsThread = new Thread(BulletSPluginPhysicsThread); 290 m_physicsThread
290 m_physicsThread.Name = BulletEngineName; 291 = Watchdog.StartThread(
291 m_physicsThread.Start(); 292 BulletSPluginPhysicsThread,
293 string.Format("{0} ({1})", BulletEngineName, RegionName),
294 ThreadPriority.Normal,
295 true,
296 false);
292 } 297 }
293 } 298 }
294 299
diff --git a/prebuild.xml b/prebuild.xml
index 006f545..ba18a2c 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -1746,6 +1746,7 @@
1746 <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> 1746 <Reference name="OpenMetaverseTypes" path="../../../../bin/"/>
1747 <Reference name="Nini.dll" path="../../../../bin/"/> 1747 <Reference name="Nini.dll" path="../../../../bin/"/>
1748 <Reference name="OpenSim.Framework"/> 1748 <Reference name="OpenSim.Framework"/>
1749 <Reference name="OpenSim.Framework.Monitoring"/>
1749 <Reference name="OpenSim.Region.Framework"/> 1750 <Reference name="OpenSim.Region.Framework"/>
1750 <Reference name="OpenSim.Region.CoreModules"/> 1751 <Reference name="OpenSim.Region.CoreModules"/>
1751 <Reference name="OpenSim.Region.OptionalModules"/> 1752 <Reference name="OpenSim.Region.OptionalModules"/>