Esempio n. 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
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZyGames.Framework.RPC.Sockets.Threading.STPStartInfo"/> class.
        /// </summary>
        /// <param name="stpStartInfo">Stp start info.</param>
        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
        }
Esempio n. 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();
 }
Esempio n. 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();
 }
Esempio n. 5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="idleTimeout">Idle timeout in milliseconds</param>
 public SmartThreadPool(int idleTimeout)
 {
     _stpStartInfo = new STPStartInfo
     {
         IdleTimeout = idleTimeout,
     };
     Initialize();
 }