public ThreadWrapper(SharedCacheThreadPool pool, bool isPermanent, ThreadPriority priority, string name) { this.pool = pool; this.isPermanent = isPermanent; this.priority = priority; this.name = name; lock (pool) { // Update the total # of threads in the pool. // pool.currentThreadCount++; } }