开发者

How to implement a ThreadPoolExecutor with rampUp time

开发者 https://www.devze.com 2023-01-30 06:43 出处:网络
I would like to know if anyone has implemented a threadpool in which a rampup time can be specified. for example , if we creat开发者_StackOverflow社区e a threadpool of size 50 and specify a rampup tim

I would like to know if anyone has implemented a threadpool in which a rampup time can be specified. for example , if we creat开发者_StackOverflow社区e a threadpool of size 50 and specify a rampup time of 50 seconds. 1 thread should be created every second. I tried to extends ThreadPoolExecutor in Java by overriding the beforeExecute method but later realized that it would call beforeExecute method before executing any Runnable.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号