Skip to content

Commit

Permalink
[JENKINS-50296] Run ThreadPoolForRemoting as SYSTEM
Browse files Browse the repository at this point in the history
  • Loading branch information
agentgonzo committed Mar 20, 2018
1 parent e5f61e2 commit f3053ef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/src/main/java/hudson/model/Computer.java
Expand Up @@ -30,7 +30,6 @@
import hudson.Extension;
import hudson.Launcher.ProcStarter;
import hudson.slaves.Cloud;
import jenkins.util.SystemProperties;
import hudson.Util;
import hudson.cli.declarative.CLIResolver;
import hudson.console.AnnotatedLargeText;
Expand Down Expand Up @@ -65,7 +64,9 @@
import hudson.util.NamingThreadFactory;
import jenkins.model.Jenkins;
import jenkins.util.ContextResettingExecutorService;
import jenkins.util.SystemProperties;
import jenkins.security.MasterToSlaveCallable;
import jenkins.security.ImpersonatingExecutorService;

import org.apache.commons.lang.StringUtils;
import org.jenkins.ui.icon.Icon;
Expand Down Expand Up @@ -1352,9 +1353,11 @@ public String call() throws IOException {
}

public static final ExecutorService threadPoolForRemoting = new ContextResettingExecutorService(
new ImpersonatingExecutorService(
Executors.newCachedThreadPool(
new ExceptionCatchingThreadFactory(
new NamingThreadFactory(new DaemonThreadFactory(), "Computer.threadPoolForRemoting"))));
new ExceptionCatchingThreadFactory(
new NamingThreadFactory(
new DaemonThreadFactory(), "Computer.threadPoolForRemoting"))), ACL.SYSTEM));

//
//
Expand Down

0 comments on commit f3053ef

Please sign in to comment.