Exemple #1
0
        public ThreadPool(int maxThreads, bool useClrTheadPool)
        {
            if (maxThreads < MinimumCount || maxThreads > MaximumCount)
            {
                throw new ArgumentOutOfRangeException("maxThreads", "must be between " + MinimumCount + " and " + MaximumCount + " inclusive");
            }

            _counter         = new WaitableCounter(maxThreads);
            _useClrTheadPool = useClrTheadPool;
        }
Exemple #2
0
 public CounterToken(WaitableCounter parent, int index)
 {
     this._parent = parent;
     this.Index   = index;
 }