diff options
author | Oren Hurvitz | 2013-01-04 08:43:05 +0200 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-02-08 21:26:05 +0000 |
commit | 319069d193dc0c812bed40077a75935288f3f5cf (patch) | |
tree | d7be1ce719301d1175d635b6db527584193456cc /ThirdParty/SmartThreadPool/SmartThreadPool.cs | |
parent | Explicitly stop PollServiceRequestManager() rather than relying on its destru... (diff) | |
download | opensim-SC_OLD-319069d193dc0c812bed40077a75935288f3f5cf.zip opensim-SC_OLD-319069d193dc0c812bed40077a75935288f3f5cf.tar.gz opensim-SC_OLD-319069d193dc0c812bed40077a75935288f3f5cf.tar.bz2 opensim-SC_OLD-319069d193dc0c812bed40077a75935288f3f5cf.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | ThirdParty/SmartThreadPool/SmartThreadPool.cs | 8 |
1 files changed, 7 insertions, 1 deletions
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 | |||
135 | /// </summary> | 135 | /// </summary> |
136 | public const ThreadPriority DefaultThreadPriority = ThreadPriority.Normal; | 136 | public const ThreadPriority DefaultThreadPriority = ThreadPriority.Normal; |
137 | 137 | ||
138 | /// <summary> | ||
139 | /// The default thread pool name | ||
140 | /// </summary> | ||
141 | public const string DefaultThreadPoolName = "SmartThreadPool"; | ||
142 | |||
138 | #endregion | 143 | #endregion |
139 | 144 | ||
140 | #region Member Variables | 145 | #region Member Variables |
@@ -143,7 +148,7 @@ namespace Amib.Threading | |||
143 | /// Contains the name of this instance of SmartThreadPool. | 148 | /// Contains the name of this instance of SmartThreadPool. |
144 | /// Can be changed by the user. | 149 | /// Can be changed by the user. |
145 | /// </summary> | 150 | /// </summary> |
146 | private string _name = "SmartThreadPool"; | 151 | private string _name = DefaultThreadPoolName; |
147 | 152 | ||
148 | /// <summary> | 153 | /// <summary> |
149 | /// Hashtable of all the threads in the thread pool. | 154 | /// Hashtable of all the threads in the thread pool. |
@@ -307,6 +312,7 @@ namespace Amib.Threading | |||
307 | 312 | ||
308 | private void Initialize() | 313 | private void Initialize() |
309 | { | 314 | { |
315 | Name = _stpStartInfo.ThreadPoolName; | ||
310 | ValidateSTPStartInfo(); | 316 | ValidateSTPStartInfo(); |
311 | 317 | ||
312 | if (null != _stpStartInfo.PerformanceCounterInstanceName) | 318 | if (null != _stpStartInfo.PerformanceCounterInstanceName) |