Search in sources :

Example 1 with NamedThreadFactory

use of org.jboss.pnc.common.concurrent.NamedThreadFactory in project pnc by project-ncl.

the class DefaultBuildCoordinator method startThreads.

private void startThreads() {
    int threadPoolSize = systemConfig.getCoordinatorThreadPoolSize();
    ExecutorService executorService = MDCExecutors.newFixedThreadPool(threadPoolSize, new NamedThreadFactory("build-coordinator-queue-processor"));
    for (int i = 0; i < threadPoolSize; i++) {
        executorService.execute(this::takeAndProcessTask);
    }
}
Also used : NamedThreadFactory(org.jboss.pnc.common.concurrent.NamedThreadFactory) ExecutorService(java.util.concurrent.ExecutorService)

Aggregations

ExecutorService (java.util.concurrent.ExecutorService)1 NamedThreadFactory (org.jboss.pnc.common.concurrent.NamedThreadFactory)1