public STPStartInfo(STPStartInfo stpStartInfo) : base(stpStartInfo) { _idleTimeout = stpStartInfo.IdleTimeout; _minWorkerThreads = stpStartInfo.MinWorkerThreads; _maxWorkerThreads = stpStartInfo.MaxWorkerThreads; #if !(WINDOWS_PHONE) _threadPriority = stpStartInfo.ThreadPriority; #endif _performanceCounterInstanceName = stpStartInfo.PerformanceCounterInstanceName; _enableLocalPerformanceCounters = stpStartInfo._enableLocalPerformanceCounters; _threadPoolName = stpStartInfo._threadPoolName; _areThreadsBackground = stpStartInfo.AreThreadsBackground; #if !(_SILVERLIGHT) && !(WINDOWS_PHONE) _apartmentState = stpStartInfo._apartmentState; #endif }
/// <summary> /// Constructor /// </summary> /// <param name="stpStartInfo">A SmartThreadPool configuration that overrides the default behavior</param> public SmartThreadPool(STPStartInfo stpStartInfo) { _stpStartInfo = new STPStartInfo(stpStartInfo); Initialize(); }
/// <summary> /// Constructor /// </summary> /// <param name="idleTimeout">Idle timeout in milliseconds</param> /// <param name="maxWorkerThreads">Upper limit of threads in the pool</param> /// <param name="minWorkerThreads">Lower limit of threads in the pool</param> public SmartThreadPool( int idleTimeout, int maxWorkerThreads, int minWorkerThreads) { _stpStartInfo = new STPStartInfo { IdleTimeout = idleTimeout, MaxWorkerThreads = maxWorkerThreads, MinWorkerThreads = minWorkerThreads, }; Initialize(); }
/// <summary> /// Constructor /// </summary> /// <param name="idleTimeout">Idle timeout in milliseconds</param> public SmartThreadPool(int idleTimeout) { _stpStartInfo = new STPStartInfo { IdleTimeout = idleTimeout, }; Initialize(); }