How to implement ThreadPoolExecutor with rampUp time

I would like to know if anyone has implemented a threadpool in which you can specify the acceleration time. for example, if we create a threadpool of size 50 and specify an acceleration time of 50 seconds. 1 thread should be created every second. I tried extending ThreadPoolExecutor in Java by overriding the beforeExecute method, but later realized that it had to call the beforeExecute method before executing any Runnable.

+3
source share

Source: https://habr.com/ru/post/1779764/


All Articles