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; }
public CounterToken(WaitableCounter parent, int index) { this._parent = parent; this.Index = index; }