Small changes to threading to send thread names to unmanaged threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects.

This commit is contained in:
BlueWall
2014-09-17 17:56:10 -04:00
parent 2d3072f053
commit af286d5fcb
5 changed files with 14 additions and 11 deletions

View File

@@ -1079,6 +1079,8 @@ namespace OpenSim.Region.Framework.Scenes
StatsReporter = new SimStatsReporter(this);
StatsReporter.OnSendStatsResult += SendSimStatsPackets;
StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
Thread.CurrentThread.Name = string.Format ("Scene:{0}", regInfo.RegionName.Replace(" ", "_"));
}
public Scene(RegionInfo regInfo, PhysicsScene physicsScene) : base(regInfo)
@@ -1396,7 +1398,7 @@ namespace OpenSim.Region.Framework.Scenes
m_heartbeatThread
= Watchdog.StartThread(
Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false);
Heartbeat, string.Format("Heartbeat-({0})", RegionInfo.RegionName.Replace(" ", "_")), ThreadPriority.Normal, false, false);
StartScripts();
}