In this recipe, you implemented a task that blocks its execution thread for a random number of milliseconds. Then, you sent 10 tasks to an executor, and while you were waiting for their finalization, you wrote information about the status of the executor to the console. You used the following methods to get the status of the Executor object:
- getCorePoolSize(): This method returns an int number, which refers to the core number of threads. It's the minimum number of threads that will be in the internal thread pool when the executor is not executing any task.
- getPoolSize(): This method returns an int value, which refers to the actual size of the internal thread pool.
- getActiveCount(): This method returns an int number, which ...