If my understanding of the way the ThreadPool works is correct, one of its purposes is to limit the number of worker threads within a process that can be created at a given
ThreadPool.SetMaxThreads(5, 5)
means the number of active thread is 5 (if you have more than 5 cpu core), does not mean that the ThreadPool can only create 5 threads. The ThreadPool maximum number of threads = CPU Core * 250.
After Thread.Sleep
, the thread is inactive, so it will not affect the execution of other threads.