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/STPStartInfo.cs | |
parent | Explicitly stop PollServiceRequestManager() rather than relying on its destru... (diff) | |
download | opensim-SC-319069d193dc0c812bed40077a75935288f3f5cf.zip opensim-SC-319069d193dc0c812bed40077a75935288f3f5cf.tar.gz opensim-SC-319069d193dc0c812bed40077a75935288f3f5cf.tar.bz2 opensim-SC-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/STPStartInfo.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ThirdParty/SmartThreadPool/STPStartInfo.cs b/ThirdParty/SmartThreadPool/STPStartInfo.cs index d181563..fa9ceb4 100644 --- a/ThirdParty/SmartThreadPool/STPStartInfo.cs +++ b/ThirdParty/SmartThreadPool/STPStartInfo.cs | |||
@@ -33,6 +33,11 @@ namespace Amib.Threading | |||
33 | private ThreadPriority _threadPriority; | 33 | private ThreadPriority _threadPriority; |
34 | 34 | ||
35 | /// <summary> | 35 | /// <summary> |
36 | /// The thread pool name. Threads will get names depending on this. | ||
37 | /// </summary> | ||
38 | private string _threadPoolName; | ||
39 | |||
40 | /// <summary> | ||
36 | /// If this field is not null then the performance counters are enabled | 41 | /// If this field is not null then the performance counters are enabled |
37 | /// and use the string as the name of the instance. | 42 | /// and use the string as the name of the instance. |
38 | /// </summary> | 43 | /// </summary> |
@@ -46,6 +51,7 @@ namespace Amib.Threading | |||
46 | _minWorkerThreads = SmartThreadPool.DefaultMinWorkerThreads; | 51 | _minWorkerThreads = SmartThreadPool.DefaultMinWorkerThreads; |
47 | _maxWorkerThreads = SmartThreadPool.DefaultMaxWorkerThreads; | 52 | _maxWorkerThreads = SmartThreadPool.DefaultMaxWorkerThreads; |
48 | _threadPriority = SmartThreadPool.DefaultThreadPriority; | 53 | _threadPriority = SmartThreadPool.DefaultThreadPriority; |
54 | _threadPoolName = SmartThreadPool.DefaultThreadPoolName; | ||
49 | _pcInstanceName = SmartThreadPool.DefaultPerformanceCounterInstanceName; | 55 | _pcInstanceName = SmartThreadPool.DefaultPerformanceCounterInstanceName; |
50 | _stackSize = SmartThreadPool.DefaultStackSize; | 56 | _stackSize = SmartThreadPool.DefaultStackSize; |
51 | } | 57 | } |
@@ -56,6 +62,7 @@ namespace Amib.Threading | |||
56 | _minWorkerThreads = stpStartInfo._minWorkerThreads; | 62 | _minWorkerThreads = stpStartInfo._minWorkerThreads; |
57 | _maxWorkerThreads = stpStartInfo._maxWorkerThreads; | 63 | _maxWorkerThreads = stpStartInfo._maxWorkerThreads; |
58 | _threadPriority = stpStartInfo._threadPriority; | 64 | _threadPriority = stpStartInfo._threadPriority; |
65 | _threadPoolName = stpStartInfo._threadPoolName; | ||
59 | _pcInstanceName = stpStartInfo._pcInstanceName; | 66 | _pcInstanceName = stpStartInfo._pcInstanceName; |
60 | _stackSize = stpStartInfo._stackSize; | 67 | _stackSize = stpStartInfo._stackSize; |
61 | } | 68 | } |
@@ -84,6 +91,13 @@ namespace Amib.Threading | |||
84 | set { _threadPriority = value; } | 91 | set { _threadPriority = value; } |
85 | } | 92 | } |
86 | 93 | ||
94 | public virtual string ThreadPoolName | ||
95 | { | ||
96 | get { return _threadPoolName; } | ||
97 | set { _threadPoolName = value; } | ||
98 | } | ||
99 | |||
100 | |||
87 | public string PerformanceCounterInstanceName | 101 | public string PerformanceCounterInstanceName |
88 | { | 102 | { |
89 | get { return _pcInstanceName; } | 103 | get { return _pcInstanceName; } |