From b77da5039eba6db0f904bfa9ca0852d640436055 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Fri, 4 Jan 2013 08:43:05 +0200 Subject: Assign the SmartThreadPool name in the constructor This is required because some threads are created in the constructor, so assigning the name afterwards would be too late. --- ThirdParty/SmartThreadPool/SmartThreadPool.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ThirdParty/SmartThreadPool/SmartThreadPool.cs') diff --git a/ThirdParty/SmartThreadPool/SmartThreadPool.cs b/ThirdParty/SmartThreadPool/SmartThreadPool.cs index bd52f62..19a0007 100644 --- a/ThirdParty/SmartThreadPool/SmartThreadPool.cs +++ b/ThirdParty/SmartThreadPool/SmartThreadPool.cs @@ -135,6 +135,11 @@ namespace Amib.Threading /// public const ThreadPriority DefaultThreadPriority = ThreadPriority.Normal; + /// + /// The default thread pool name + /// + public const string DefaultThreadPoolName = "SmartThreadPool"; + #endregion #region Member Variables @@ -143,7 +148,7 @@ namespace Amib.Threading /// Contains the name of this instance of SmartThreadPool. /// Can be changed by the user. /// - private string _name = "SmartThreadPool"; + private string _name = DefaultThreadPoolName; /// /// Hashtable of all the threads in the thread pool. @@ -307,6 +312,7 @@ namespace Amib.Threading private void Initialize() { + Name = _stpStartInfo.ThreadPoolName; ValidateSTPStartInfo(); if (null != _stpStartInfo.PerformanceCounterInstanceName) -- cgit v1.1