Esempio n. 1
0
        public ThreadPool(int maxThreads, bool useFXThreadPool)
        {
            if (maxThreads < MinimumCount || maxThreads > MaximumCount)
            {
                throw new ArgumentOutOfRangeException("maxThreads", "must be between " + MinimumCount.ToString() + " and " + MaximumCount.ToString() + " inclusive");
            }

            Counter         = new WaitableCounter(maxThreads);
            UseFXThreadPool = useFXThreadPool;
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 public CounterToken(WaitableCounter parent, int index)
 {
     this.parent = parent;
     this.index = index;
 }
 public CounterToken(WaitableCounter parent, int index)
 {
     this.parent = parent;
     this.index  = index;
 }