Fix crash due to setting Thread.name after thread start.
Signed-off-by: Diva Canto <diva@metaverseink.com>LSLKeyTest
parent
1e44aba620
commit
97a471cb35
|
@ -121,6 +121,7 @@ namespace OpenSim.Framework.Monitoring
|
||||||
Thread thread = new Thread(start);
|
Thread thread = new Thread(start);
|
||||||
thread.Priority = priority;
|
thread.Priority = priority;
|
||||||
thread.IsBackground = isBackground;
|
thread.IsBackground = isBackground;
|
||||||
|
thread.Name = name;
|
||||||
|
|
||||||
Watchdog.ThreadWatchdogInfo twi
|
Watchdog.ThreadWatchdogInfo twi
|
||||||
= new Watchdog.ThreadWatchdogInfo(thread, timeout, name)
|
= new Watchdog.ThreadWatchdogInfo(thread, timeout, name)
|
||||||
|
@ -129,7 +130,7 @@ namespace OpenSim.Framework.Monitoring
|
||||||
Watchdog.AddThread(twi, name, log:log);
|
Watchdog.AddThread(twi, name, log:log);
|
||||||
|
|
||||||
thread.Start();
|
thread.Start();
|
||||||
thread.Name = name;
|
|
||||||
|
|
||||||
return thread;
|
return thread;
|
||||||
}
|
}
|
||||||
|
|
|
@ -689,8 +689,9 @@ namespace Amib.Threading
|
||||||
#if !(_SILVERLIGHT) && !(WINDOWS_PHONE)
|
#if !(_SILVERLIGHT) && !(WINDOWS_PHONE)
|
||||||
workerThread.Priority = _stpStartInfo.ThreadPriority;
|
workerThread.Priority = _stpStartInfo.ThreadPriority;
|
||||||
#endif
|
#endif
|
||||||
workerThread.Start();
|
|
||||||
workerThread.Name = string.Format("STP:{0}:{1}", Name, _threadCounter);
|
workerThread.Name = string.Format("STP:{0}:{1}", Name, _threadCounter);
|
||||||
|
workerThread.Start();
|
||||||
|
|
||||||
++_threadCounter;
|
++_threadCounter;
|
||||||
|
|
||||||
// Add it to the dictionary and update its creation time.
|
// Add it to the dictionary and update its creation time.
|
||||||
|
|
Loading…
Reference in New Issue