Immediate return.
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -61,13 +61,11 @@ public class ExecutorAutoConfiguration {
|
|||||||
public ThreadPoolExecutor threadPoolExecutor() {
|
public ThreadPoolExecutor threadPoolExecutor() {
|
||||||
final BlockingQueue<Runnable> blockingQueue = new ArrayBlockingQueue<>(
|
final BlockingQueue<Runnable> blockingQueue = new ArrayBlockingQueue<>(
|
||||||
asyncConfigurerProperties.getQueuesize());
|
asyncConfigurerProperties.getQueuesize());
|
||||||
final ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(asyncConfigurerProperties.getCorethreads(),
|
return new ThreadPoolExecutor(asyncConfigurerProperties.getCorethreads(),
|
||||||
asyncConfigurerProperties.getMaxthreads(), asyncConfigurerProperties.getIdletimeout(),
|
asyncConfigurerProperties.getMaxthreads(), asyncConfigurerProperties.getIdletimeout(),
|
||||||
TimeUnit.MILLISECONDS, blockingQueue,
|
TimeUnit.MILLISECONDS, blockingQueue,
|
||||||
new ThreadFactoryBuilder().setNameFormat("central-executor-pool-%d").build(),
|
new ThreadFactoryBuilder().setNameFormat("central-executor-pool-%d").build(),
|
||||||
new PoolSizeExceededPolicy());
|
new PoolSizeExceededPolicy());
|
||||||
|
|
||||||
return threadPoolExecutor;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class PoolSizeExceededPolicy extends CallerRunsPolicy {
|
private static class PoolSizeExceededPolicy extends CallerRunsPolicy {
|
||||||
|
|||||||
Reference in New Issue
Block a user