From 376fab140227e92dbd841436509a97b87c9e7792 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Wed, 17 Sep 2014 18:11:41 -0400 Subject: Revert "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 reverts commit af286d5fcb688e8b64202b6deca4f249e9a2b6b8. Issue with Jenkins builds --- OpenSim/Framework/Monitoring/Watchdog.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'OpenSim/Framework/Monitoring/Watchdog.cs') diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs index e9f22f1..e9e7bd2 100644 --- a/OpenSim/Framework/Monitoring/Watchdog.cs +++ b/OpenSim/Framework/Monitoring/Watchdog.cs @@ -87,7 +87,7 @@ namespace OpenSim.Framework.Monitoring /// public Stat Stat { get; set; } - public ThreadWatchdogInfo(Thread thread, int timeout, string name) + public ThreadWatchdogInfo(Thread thread, int timeout) { Thread = thread; Timeout = timeout; @@ -96,8 +96,8 @@ namespace OpenSim.Framework.Monitoring Stat = new Stat( - name, - string.Format("Last update of thread {0}", name), + thread.Name, + string.Format("Last update of thread {0}", thread.Name), "", "ms", "server", @@ -216,11 +216,12 @@ namespace OpenSim.Framework.Monitoring bool alarmIfTimeout, Func alarmMethod, int timeout, bool log = true) { Thread thread = new Thread(start); + thread.Name = name; thread.Priority = priority; thread.IsBackground = isBackground; ThreadWatchdogInfo twi - = new ThreadWatchdogInfo(thread, timeout, name) + = new ThreadWatchdogInfo(thread, timeout) { AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod }; if (log) @@ -229,10 +230,8 @@ namespace OpenSim.Framework.Monitoring lock (m_threads) m_threads.Add(twi.Thread.ManagedThreadId, twi); - - thread.Start(); - thread.Name = name; + thread.Start(); return thread; } -- cgit v1.1