
static ThreadPoolExecutor threadPoolExecutor;public static void main(String[] args){threadPoolExecutor = new ThreadPoolExecutor(0,100,3, TimeUnit.SECONDS,new ArrayBlockingQueue<>(98));for (int i = 0; i <3; i++) {threadPoolExecutor.execute(() -> {log.debug("worker thread size[{}]", threadPoolExecutor.getPoolSize());});}}
