public ThreadPoolProvider(ThreadpoolConfig threadpoolConfig, Metric metric, ProcessTerminator processTerminator) {
WorkerCompletionTimingThreadPoolExecutor executor =
new WorkerCompletionTimingThreadPoolExecutor(threadpoolConfig.maxthreads(),
threadpoolConfig.maxthreads(),
0L, TimeUnit.SECONDS,
new SynchronousQueue<>(false),
ThreadFactoryFactory.getThreadFactory("threadpool"));
executor.prestartAllCoreThreads();
threadpool = new ExecutorServiceWrapper(executor, metric, processTerminator,
threadpoolConfig.maxThreadExecutionTimeSeconds() * 1000L);
}