Add threads to the watchdog thread list before we start them.
Hopefully this wil make "WATCHDOG: Asked to update thread ## which is not being monitored" messages." go away.0.7.2-post-fixes
parent
b527901556
commit
acad65a832
|
@ -122,6 +122,11 @@ namespace OpenSim.Framework
|
||||||
public static Thread StartThread(
|
public static Thread StartThread(
|
||||||
ThreadStart start, string name, ThreadPriority priority, bool isBackground, int timeout)
|
ThreadStart start, string name, ThreadPriority priority, bool isBackground, int timeout)
|
||||||
{
|
{
|
||||||
|
m_log.Debug("[WATCHDOG]: Started tracking thread \"" + twi.Thread.Name + "\" (ID " + twi.Thread.ManagedThreadId + ")");
|
||||||
|
|
||||||
|
lock (m_threads)
|
||||||
|
m_threads.Add(twi.Thread.ManagedThreadId, twi);
|
||||||
|
|
||||||
Thread thread = new Thread(start);
|
Thread thread = new Thread(start);
|
||||||
thread.Name = name;
|
thread.Name = name;
|
||||||
thread.Priority = priority;
|
thread.Priority = priority;
|
||||||
|
@ -130,11 +135,6 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
ThreadWatchdogInfo twi = new ThreadWatchdogInfo(thread, timeout);
|
ThreadWatchdogInfo twi = new ThreadWatchdogInfo(thread, timeout);
|
||||||
|
|
||||||
m_log.Debug("[WATCHDOG]: Started tracking thread \"" + twi.Thread.Name + "\" (ID " + twi.Thread.ManagedThreadId + ")");
|
|
||||||
|
|
||||||
lock (m_threads)
|
|
||||||
m_threads.Add(twi.Thread.ManagedThreadId, twi);
|
|
||||||
|
|
||||||
return thread;
|
return thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue