Dynamic Thread Pool
Have a look at below API in ThreadPoolExecutor public void setCorePoolSize(int corePoolSize) Sets the core number of threads. This overrides any value set in the constructor. If the new value is smaller than the current value, excess existing threads will be terminated when they next become idle. If larger, new threads will, if needed, be … Read more