public ThreadPool(int maxThreads, bool useFXThreadPool) { if (maxThreads < MinimumCount || maxThreads > MaximumCount) { throw new ArgumentOutOfRangeException("maxThreads", "must be between " + MinimumCount.ToString() + " and " + MaximumCount.ToString() + " inclusive"); } this.counter = new WaitableCounter(maxThreads); this.useFXTheadPool = useFXThreadPool; }
public CounterToken(WaitableCounter parent, int index) { this.parent = parent; this.index = index; }