Any ideas how to determine the number of active threads currently running in an ExecutorService?
Place a static volatile counter on the thread which is updated whenever the thread is activated and deactivated. Also, see the API.