diff options
author | Justin Clark-Casey (justincc) | 2012-10-12 02:59:28 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-12 02:59:28 +0100 |
commit | ab7b7c5d3df03decbcaa3b8bf7683f1268f2be92 (patch) | |
tree | 9af8da93d7108035e1d9512834ce8b0fadee5017 /OpenSim/Framework | |
parent | Add "active true|false" to "debug scene" console command. (diff) | |
download | opensim-SC_OLD-ab7b7c5d3df03decbcaa3b8bf7683f1268f2be92.zip opensim-SC_OLD-ab7b7c5d3df03decbcaa3b8bf7683f1268f2be92.tar.gz opensim-SC_OLD-ab7b7c5d3df03decbcaa3b8bf7683f1268f2be92.tar.bz2 opensim-SC_OLD-ab7b7c5d3df03decbcaa3b8bf7683f1268f2be92.tar.xz |
Get Watchdog to log thread removal
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Monitoring/Watchdog.cs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Framework/Monitoring/Watchdog.cs b/OpenSim/Framework/Monitoring/Watchdog.cs index 7964f28..a20326d 100644 --- a/OpenSim/Framework/Monitoring/Watchdog.cs +++ b/OpenSim/Framework/Monitoring/Watchdog.cs | |||
@@ -231,7 +231,25 @@ namespace OpenSim.Framework.Monitoring | |||
231 | private static bool RemoveThread(int threadID) | 231 | private static bool RemoveThread(int threadID) |
232 | { | 232 | { |
233 | lock (m_threads) | 233 | lock (m_threads) |
234 | return m_threads.Remove(threadID); | 234 | { |
235 | ThreadWatchdogInfo twi; | ||
236 | if (m_threads.TryGetValue(threadID, out twi)) | ||
237 | { | ||
238 | m_log.DebugFormat( | ||
239 | "[WATCHDOG]: Removing thread {0}, ID {1}", twi.Thread.Name, twi.Thread.ManagedThreadId); | ||
240 | |||
241 | m_threads.Remove(threadID); | ||
242 | |||
243 | return true; | ||
244 | } | ||
245 | else | ||
246 | { | ||
247 | m_log.WarnFormat( | ||
248 | "[WATCHDOG]: Requested to remove thread with ID {0} but this is not being monitored", threadID); | ||
249 | |||
250 | return false; | ||
251 | } | ||
252 | } | ||
235 | } | 253 | } |
236 | 254 | ||
237 | public static bool AbortThread(int threadID) | 255 | public static bool AbortThread(int threadID) |