Exemple #1
0
 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
 }
Exemple #2
0
        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
        }
Exemple #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="stpStartInfo">A SmartThreadPool configuration that overrides the default behavior</param>
 public SmartThreadPool(STPStartInfo stpStartInfo)
 {
     _stpStartInfo = new STPStartInfo(stpStartInfo);
     Initialize();
 }
Exemple #4
0
        /// <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();
        }
Exemple #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="idleTimeout">Idle timeout in milliseconds</param>
 public SmartThreadPool(int idleTimeout)
 {
     _stpStartInfo = new STPStartInfo
     {
         IdleTimeout = idleTimeout,
     };
     Initialize();
 }