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 --- ThirdParty/SmartThreadPool/SmartThreadPool.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ThirdParty') diff --git a/ThirdParty/SmartThreadPool/SmartThreadPool.cs b/ThirdParty/SmartThreadPool/SmartThreadPool.cs index 615518e..9043d3a 100644 --- a/ThirdParty/SmartThreadPool/SmartThreadPool.cs +++ b/ThirdParty/SmartThreadPool/SmartThreadPool.cs @@ -689,9 +689,10 @@ namespace Amib.Threading #if !(_SILVERLIGHT) && !(WINDOWS_PHONE) workerThread.Priority = _stpStartInfo.ThreadPriority; #endif - workerThread.Start(); workerThread.Name = string.Format("STP:{0}:{1}", Name, _threadCounter); - ++_threadCounter; + workerThread.Start(); + + ++_threadCounter; // Add it to the dictionary and update its creation time. _workerThreads[workerThread] = new ThreadEntry(this); -- cgit v1.1