Limiting the number of processors and threads in the thread pool