private void configureThreadPool(String name, ThreadPoolExecutor executor) {
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.DiscardPolicy());
executor.setThreadFactory(new CustomThreadFactory(name) {
@Override
protected Thread allocateThread(ThreadGroup group, Runnable target, String name) {
return new CommThread(group, target, name);
}
});
ThreadPoolExecutorMonitor.register(name, executor);
}