aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Monitoring/Watchdog.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Monitoring/Watchdog.cs')
-rw-r--r--OpenSim/Framework/Monitoring/Watchdog.cs13
1 files changed, 6 insertions, 7 deletions
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
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, string name) 90 public ThreadWatchdogInfo(Thread thread, int timeout)
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 name, 99 thread.Name,
100 string.Format("Last update of thread {0}", name), 100 string.Format("Last update of thread {0}", thread.Name),
101 "", 101 "",
102 "ms", 102 "ms",
103 "server", 103 "server",
@@ -216,11 +216,12 @@ 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;
219 thread.Priority = priority; 220 thread.Priority = priority;
220 thread.IsBackground = isBackground; 221 thread.IsBackground = isBackground;
221 222
222 ThreadWatchdogInfo twi 223 ThreadWatchdogInfo twi
223 = new ThreadWatchdogInfo(thread, timeout, name) 224 = new ThreadWatchdogInfo(thread, timeout)
224 { AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod }; 225 { AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod };
225 226
226 if (log) 227 if (log)
@@ -229,10 +230,8 @@ namespace OpenSim.Framework.Monitoring
229 230
230 lock (m_threads) 231 lock (m_threads)
231 m_threads.Add(twi.Thread.ManagedThreadId, twi); 232 m_threads.Add(twi.Thread.ManagedThreadId, twi);
232
233 thread.Start();
234 thread.Name = name;
235 233
234 thread.Start();
236 235
237 return thread; 236 return thread;
238 } 237 }