aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Watchdog.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Framework/Watchdog.cs b/OpenSim/Framework/Watchdog.cs
index 3a40d0e..8e82f5a 100644
--- a/OpenSim/Framework/Watchdog.cs
+++ b/OpenSim/Framework/Watchdog.cs
@@ -122,19 +122,20 @@ namespace OpenSim.Framework
122 public static Thread StartThread( 122 public static Thread StartThread(
123 ThreadStart start, string name, ThreadPriority priority, bool isBackground, int timeout) 123 ThreadStart start, string name, ThreadPriority priority, bool isBackground, int timeout)
124 { 124 {
125 Thread thread = new Thread(start);
126 thread.Name = name;
127 thread.Priority = priority;
128 thread.IsBackground = isBackground;
129
130 ThreadWatchdogInfo twi = new ThreadWatchdogInfo(thread, timeout);
131
125 m_log.Debug("[WATCHDOG]: Started tracking thread \"" + twi.Thread.Name + "\" (ID " + twi.Thread.ManagedThreadId + ")"); 132 m_log.Debug("[WATCHDOG]: Started tracking thread \"" + twi.Thread.Name + "\" (ID " + twi.Thread.ManagedThreadId + ")");
126 133
127 lock (m_threads) 134 lock (m_threads)
128 m_threads.Add(twi.Thread.ManagedThreadId, twi); 135 m_threads.Add(twi.Thread.ManagedThreadId, twi);
129 136
130 Thread thread = new Thread(start);
131 thread.Name = name;
132 thread.Priority = priority;
133 thread.IsBackground = isBackground;
134 thread.Start(); 137 thread.Start();
135 138
136 ThreadWatchdogInfo twi = new ThreadWatchdogInfo(thread, timeout);
137
138 return thread; 139 return thread;
139 } 140 }
140 141