From 97a471cb357029e6f93c00ced5a7e6db79d783be Mon Sep 17 00:00:00 2001 From: Roger Kirkman Date: Thu, 5 May 2016 15:21:15 +0100 Subject: Fix crash due to setting Thread.name after thread start. Signed-off-by: Diva Canto --- OpenSim/Framework/Monitoring/WorkManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/Monitoring/WorkManager.cs') diff --git a/OpenSim/Framework/Monitoring/WorkManager.cs b/OpenSim/Framework/Monitoring/WorkManager.cs index d1a74ce..a7a03a0 100644 --- a/OpenSim/Framework/Monitoring/WorkManager.cs +++ b/OpenSim/Framework/Monitoring/WorkManager.cs @@ -121,7 +121,8 @@ namespace OpenSim.Framework.Monitoring Thread thread = new Thread(start); thread.Priority = priority; thread.IsBackground = isBackground; - + thread.Name = name; + Watchdog.ThreadWatchdogInfo twi = new Watchdog.ThreadWatchdogInfo(thread, timeout, name) { AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod }; @@ -129,7 +130,7 @@ namespace OpenSim.Framework.Monitoring Watchdog.AddThread(twi, name, log:log); thread.Start(); - thread.Name = name; + return thread; } -- cgit v1.1