diff options
author | BlueWall | 2014-09-17 20:03:54 -0400 |
---|---|---|
committer | BlueWall | 2014-09-17 20:03:54 -0400 |
commit | 96a24491222e29ba8d615d9ffaf63e72742a9cc7 (patch) | |
tree | eddde1cac95af0c9ef1eec67f623ead3d49afc65 /OpenSim/Framework/Monitoring/Watchdog.cs | |
parent | Add eeyore to contributors (diff) | |
download | opensim-SC_OLD-96a24491222e29ba8d615d9ffaf63e72742a9cc7.zip opensim-SC_OLD-96a24491222e29ba8d615d9ffaf63e72742a9cc7.tar.gz opensim-SC_OLD-96a24491222e29ba8d615d9ffaf63e72742a9cc7.tar.bz2 opensim-SC_OLD-96a24491222e29ba8d615d9ffaf63e72742a9cc7.tar.xz |
Undo "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.""
Fix for break in next commit
This reverts commit 376fab140227e92dbd841436509a97b87c9e7792.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Monitoring/Watchdog.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs index e9e7bd2..e9f22f1 100644 --- a/OpenSim/Framework/Monitoring/Watchdog.cs +++ b/OpenSim/Framework/Monitoring/Watchdog.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Framework.Monitoring | |||
87 | /// </summary> | 87 | /// </summary> |
88 | public Stat Stat { get; set; } | 88 | public Stat Stat { get; set; } |
89 | 89 | ||
90 | public ThreadWatchdogInfo(Thread thread, int timeout) | 90 | public ThreadWatchdogInfo(Thread thread, int timeout, string name) |
91 | { | 91 | { |
92 | Thread = thread; | 92 | Thread = thread; |
93 | Timeout = timeout; | 93 | Timeout = timeout; |
@@ -96,8 +96,8 @@ namespace OpenSim.Framework.Monitoring | |||
96 | 96 | ||
97 | Stat | 97 | Stat |
98 | = new Stat( | 98 | = new Stat( |
99 | thread.Name, | 99 | name, |
100 | string.Format("Last update of thread {0}", thread.Name), | 100 | string.Format("Last update of thread {0}", name), |
101 | "", | 101 | "", |
102 | "ms", | 102 | "ms", |
103 | "server", | 103 | "server", |
@@ -216,12 +216,11 @@ namespace OpenSim.Framework.Monitoring | |||
216 | bool alarmIfTimeout, Func<string> alarmMethod, int timeout, bool log = true) | 216 | bool alarmIfTimeout, Func<string> alarmMethod, int timeout, bool log = true) |
217 | { | 217 | { |
218 | Thread thread = new Thread(start); | 218 | Thread thread = new Thread(start); |
219 | thread.Name = name; | ||
220 | thread.Priority = priority; | 219 | thread.Priority = priority; |
221 | thread.IsBackground = isBackground; | 220 | thread.IsBackground = isBackground; |
222 | 221 | ||
223 | ThreadWatchdogInfo twi | 222 | ThreadWatchdogInfo twi |
224 | = new ThreadWatchdogInfo(thread, timeout) | 223 | = new ThreadWatchdogInfo(thread, timeout, name) |
225 | { AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod }; | 224 | { AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod }; |
226 | 225 | ||
227 | if (log) | 226 | if (log) |
@@ -230,8 +229,10 @@ namespace OpenSim.Framework.Monitoring | |||
230 | 229 | ||
231 | lock (m_threads) | 230 | lock (m_threads) |
232 | m_threads.Add(twi.Thread.ManagedThreadId, twi); | 231 | m_threads.Add(twi.Thread.ManagedThreadId, twi); |
233 | 232 | ||
234 | thread.Start(); | 233 | thread.Start(); |
234 | thread.Name = name; | ||
235 | |||
235 | 236 | ||
236 | return thread; | 237 | return thread; |
237 | } | 238 | } |