diff options
Diffstat (limited to '')
-rw-r--r-- | ThirdParty/SmartThreadPool/STPStartInfo.cs | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/ThirdParty/SmartThreadPool/STPStartInfo.cs b/ThirdParty/SmartThreadPool/STPStartInfo.cs index 96fa094..8ea547c 100644 --- a/ThirdParty/SmartThreadPool/STPStartInfo.cs +++ b/ThirdParty/SmartThreadPool/STPStartInfo.cs | |||
@@ -3,9 +3,9 @@ using System.Threading; | |||
3 | 3 | ||
4 | namespace Amib.Threading | 4 | namespace Amib.Threading |
5 | { | 5 | { |
6 | /// <summary> | 6 | /// <summary> |
7 | /// Summary description for STPStartInfo. | 7 | /// Summary description for STPStartInfo. |
8 | /// </summary> | 8 | /// </summary> |
9 | public class STPStartInfo : WIGStartInfo | 9 | public class STPStartInfo : WIGStartInfo |
10 | { | 10 | { |
11 | private int _idleTimeout = SmartThreadPool.DefaultIdleTimeout; | 11 | private int _idleTimeout = SmartThreadPool.DefaultIdleTimeout; |
@@ -31,7 +31,7 @@ namespace Amib.Threading | |||
31 | _minWorkerThreads = SmartThreadPool.DefaultMinWorkerThreads; | 31 | _minWorkerThreads = SmartThreadPool.DefaultMinWorkerThreads; |
32 | } | 32 | } |
33 | 33 | ||
34 | public STPStartInfo(STPStartInfo stpStartInfo) | 34 | public STPStartInfo(STPStartInfo stpStartInfo) |
35 | : base(stpStartInfo) | 35 | : base(stpStartInfo) |
36 | { | 36 | { |
37 | _idleTimeout = stpStartInfo.IdleTimeout; | 37 | _idleTimeout = stpStartInfo.IdleTimeout; |
@@ -48,63 +48,63 @@ namespace Amib.Threading | |||
48 | _apartmentState = stpStartInfo._apartmentState; | 48 | _apartmentState = stpStartInfo._apartmentState; |
49 | #endif | 49 | #endif |
50 | } | 50 | } |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// Get/Set the idle timeout in milliseconds. | 53 | /// Get/Set the idle timeout in milliseconds. |
54 | /// If a thread is idle (starved) longer than IdleTimeout then it may quit. | 54 | /// If a thread is idle (starved) longer than IdleTimeout then it may quit. |
55 | /// </summary> | 55 | /// </summary> |
56 | public virtual int IdleTimeout | 56 | public virtual int IdleTimeout |
57 | { | 57 | { |
58 | get { return _idleTimeout; } | 58 | get { return _idleTimeout; } |
59 | set | 59 | set |
60 | { | 60 | { |
61 | ThrowIfReadOnly(); | 61 | ThrowIfReadOnly(); |
62 | _idleTimeout = value; | 62 | _idleTimeout = value; |
63 | } | 63 | } |
64 | } | 64 | } |
65 | 65 | ||
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
68 | /// Get/Set the lower limit of threads in the pool. | 68 | /// Get/Set the lower limit of threads in the pool. |
69 | /// </summary> | 69 | /// </summary> |
70 | public virtual int MinWorkerThreads | 70 | public virtual int MinWorkerThreads |
71 | { | 71 | { |
72 | get { return _minWorkerThreads; } | 72 | get { return _minWorkerThreads; } |
73 | set | 73 | set |
74 | { | 74 | { |
75 | ThrowIfReadOnly(); | 75 | ThrowIfReadOnly(); |
76 | _minWorkerThreads = value; | 76 | _minWorkerThreads = value; |
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | 80 | ||
81 | /// <summary> | 81 | /// <summary> |
82 | /// Get/Set the upper limit of threads in the pool. | 82 | /// Get/Set the upper limit of threads in the pool. |
83 | /// </summary> | 83 | /// </summary> |
84 | public virtual int MaxWorkerThreads | 84 | public virtual int MaxWorkerThreads |
85 | { | 85 | { |
86 | get { return _maxWorkerThreads; } | 86 | get { return _maxWorkerThreads; } |
87 | set | 87 | set |
88 | { | 88 | { |
89 | ThrowIfReadOnly(); | 89 | ThrowIfReadOnly(); |
90 | _maxWorkerThreads = value; | 90 | _maxWorkerThreads = value; |
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
94 | #if !(WINDOWS_PHONE) | 94 | #if !(WINDOWS_PHONE) |
95 | /// <summary> | 95 | /// <summary> |
96 | /// Get/Set the scheduling priority of the threads in the pool. | 96 | /// Get/Set the scheduling priority of the threads in the pool. |
97 | /// The Os handles the scheduling. | 97 | /// The Os handles the scheduling. |
98 | /// </summary> | 98 | /// </summary> |
99 | public virtual ThreadPriority ThreadPriority | 99 | public virtual ThreadPriority ThreadPriority |
100 | { | 100 | { |
101 | get { return _threadPriority; } | 101 | get { return _threadPriority; } |
102 | set | 102 | set |
103 | { | 103 | { |
104 | ThrowIfReadOnly(); | 104 | ThrowIfReadOnly(); |
105 | _threadPriority = value; | 105 | _threadPriority = value; |
106 | } | 106 | } |
107 | } | 107 | } |
108 | #endif | 108 | #endif |
109 | /// <summary> | 109 | /// <summary> |
110 | /// Get/Set the thread pool name. Threads will get names depending on this. | 110 | /// Get/Set the thread pool name. Threads will get names depending on this. |
@@ -118,50 +118,50 @@ namespace Amib.Threading | |||
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | /// <summary> | 121 | /// <summary> |
122 | /// Get/Set the performance counter instance name of this SmartThreadPool | 122 | /// Get/Set the performance counter instance name of this SmartThreadPool |
123 | /// The default is null which indicate not to use performance counters at all. | 123 | /// The default is null which indicate not to use performance counters at all. |
124 | /// </summary> | 124 | /// </summary> |
125 | public virtual string PerformanceCounterInstanceName | 125 | public virtual string PerformanceCounterInstanceName |
126 | { | 126 | { |
127 | get { return _performanceCounterInstanceName; } | 127 | get { return _performanceCounterInstanceName; } |
128 | set | 128 | set |
129 | { | 129 | { |
130 | ThrowIfReadOnly(); | 130 | ThrowIfReadOnly(); |
131 | _performanceCounterInstanceName = value; | 131 | _performanceCounterInstanceName = value; |
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | /// <summary> | 135 | /// <summary> |
136 | /// Enable/Disable the local performance counter. | 136 | /// Enable/Disable the local performance counter. |
137 | /// This enables the user to get some performance information about the SmartThreadPool | 137 | /// This enables the user to get some performance information about the SmartThreadPool |
138 | /// without using Windows performance counters. (Useful on WindowsCE, Silverlight, etc.) | 138 | /// without using Windows performance counters. (Useful on WindowsCE, Silverlight, etc.) |
139 | /// The default is false. | 139 | /// The default is false. |
140 | /// </summary> | 140 | /// </summary> |
141 | public virtual bool EnableLocalPerformanceCounters | 141 | public virtual bool EnableLocalPerformanceCounters |
142 | { | 142 | { |
143 | get { return _enableLocalPerformanceCounters; } | 143 | get { return _enableLocalPerformanceCounters; } |
144 | set | 144 | set |
145 | { | 145 | { |
146 | ThrowIfReadOnly(); | 146 | ThrowIfReadOnly(); |
147 | _enableLocalPerformanceCounters = value; | 147 | _enableLocalPerformanceCounters = value; |
148 | } | 148 | } |
149 | } | 149 | } |
150 | 150 | ||
151 | /// <summary> | 151 | /// <summary> |
152 | /// Get/Set backgroundness of thread in thread pool. | 152 | /// Get/Set backgroundness of thread in thread pool. |
153 | /// </summary> | 153 | /// </summary> |
154 | public virtual bool AreThreadsBackground | 154 | public virtual bool AreThreadsBackground |
155 | { | 155 | { |
156 | get { return _areThreadsBackground; } | 156 | get { return _areThreadsBackground; } |
157 | set | 157 | set |
158 | { | 158 | { |
159 | ThrowIfReadOnly (); | 159 | ThrowIfReadOnly (); |
160 | _areThreadsBackground = value; | 160 | _areThreadsBackground = value; |
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | /// <summary> | 164 | /// <summary> |
165 | /// Get a readonly version of this STPStartInfo. | 165 | /// Get a readonly version of this STPStartInfo. |
166 | /// </summary> | 166 | /// </summary> |
167 | /// <returns>Returns a readonly reference to this STPStartInfo</returns> | 167 | /// <returns>Returns a readonly reference to this STPStartInfo</returns> |
@@ -185,10 +185,10 @@ namespace Amib.Threading | |||
185 | ThrowIfReadOnly(); | 185 | ThrowIfReadOnly(); |
186 | _apartmentState = value; | 186 | _apartmentState = value; |
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
190 | #if !(_SILVERLIGHT) && !(WINDOWS_PHONE) | 190 | #if !(_SILVERLIGHT) && !(WINDOWS_PHONE) |
191 | 191 | ||
192 | /// <summary> | 192 | /// <summary> |
193 | /// Get/Set the max stack size of threads in the thread pool | 193 | /// Get/Set the max stack size of threads in the thread pool |
194 | /// </summary> | 194 | /// </summary> |