How to implement a ThreadPoolExecutor with rampUp time
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.
精彩评论