<dependency>
<groupId>org.chilldev.commons</groupId>
<artifactId>concurrent</artifactId>
<version>1.0.0</version>
</dependency>
implementation 'org.chilldev.commons:concurrent:1.0.0'
import org.chilldev.commons.concurrent.SplitThreadPoolExecutor;
public class ThreadPoolManagementExample {
public static void main(String[] args) {
SplitThreadPoolExecutor threadPool = SplitThreadPoolExecutor.newThreadPool(10, 20, 60);
for (int i = 0; i < 100; i++) {
threadPool.execute(() -> {
// ...
});
}
threadPool.shutdown();
}
}