Where and how to check through code number of threads available in threadpool.
What i want is: For example if no of threads in threadpool are 10 then at any given time I should not be using say more than 3 threads. Once an existing thread gets free, I should start a new task, keeping max count 3.