示例#1
0
 public ThreadPoolStartInfo(ThreadPoolStartInfo threadPoolStartInfo)
 {
     this._idleTimeout             = threadPoolStartInfo._idleTimeout;
     this._minWorkerThreads        = threadPoolStartInfo._minWorkerThreads;
     this._maxWorkerThreads        = threadPoolStartInfo._maxWorkerThreads;
     this._threadPriority          = threadPoolStartInfo._threadPriority;
     this._perfCounterInstanceName = threadPoolStartInfo._perfCounterInstanceName;
     this._startSuspended          = threadPoolStartInfo._startSuspended;
 }
示例#2
0
		/// <summary>
		/// Initializes a new instance of the ThreadPoolStartInfo class.
		/// </summary>
		/// <param name="threadPoolStartInfo"></param>
        public ThreadPoolStartInfo(ThreadPoolStartInfo threadPoolStartInfo)
        {
            _idleTimeout = threadPoolStartInfo._idleTimeout;
            _minWorkerThreads = threadPoolStartInfo._minWorkerThreads;
            _maxWorkerThreads = threadPoolStartInfo._maxWorkerThreads;
			_threadPriority = threadPoolStartInfo._threadPriority;
			_perfCounterInstanceName = threadPoolStartInfo._perfCounterInstanceName;
			_startSuspended = threadPoolStartInfo._startSuspended;
		}
示例#3
0
 public ThreadPoolEx()
 {
     this._threadPoolStartInfo   = new ThreadPoolStartInfo();
     this._workItemsQueue        = new WorkItemsQueue();
     this._workerThreads         = new SynchronizedHashtable();
     this._inUseWorkerThreads    = 0;
     this._isIdleWaitHandle      = new ManualResetEvent(true);
     this._shuttingDownEvent     = new ManualResetEvent(false);
     this._shutdown              = false;
     this._threadCounter         = 0;
     this._isDisposed            = false;
     this._workItemsProcessed    = 0L;
     this._currentWorkItemsCount = 0;
     this._name = "ThreadPoolEx";
     this.Initialize();
 }