diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2019-09-05 12:37:09 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-09-06 20:21:05 +0200 |
commit | 8fd7387bac3a178bffba3a72ac9bd0c96698a3e0 (patch) | |
tree | 5275e125c8e54a69f73cb574cc3d06e809c4ff61 | |
parent | b08e4d46d652a960a168318f6cace9d33d9ceebc (diff) | |
download | sonarqube-8fd7387bac3a178bffba3a72ac9bd0c96698a3e0.tar.gz sonarqube-8fd7387bac3a178bffba3a72ac9bd0c96698a3e0.zip |
threads should have unique names to ease debugging
-rw-r--r-- | server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java b/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java index abbd14efcbb..f55b6ed2e85 100644 --- a/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java +++ b/server/sonar-main/src/main/java/org/sonar/application/SchedulerImpl.java @@ -54,6 +54,8 @@ public class SchedulerImpl implements Scheduler, ManagedProcessEventListener, Pr private static final Logger LOG = LoggerFactory.getLogger(SchedulerImpl.class); private static final ManagedProcessHandler.Timeout HARD_STOP_TIMEOUT = newTimeout(1, TimeUnit.MINUTES); + private static int hardStopperThreadIndex = 0; + private static int restartStopperThreadIndex = 0; private final AppSettings settings; private final AppReloader appReloader; @@ -452,8 +454,9 @@ public class SchedulerImpl implements Scheduler, ManagedProcessEventListener, Pr } private class RestartStopperThread extends Thread { + private RestartStopperThread() { - super("Restart stopper"); + super("RestartStopper-" + restartStopperThreadIndex++); } @Override @@ -465,7 +468,7 @@ public class SchedulerImpl implements Scheduler, ManagedProcessEventListener, Pr private class HardStopperThread extends Thread { private HardStopperThread() { - super("Hard stopper"); + super("HardStopper-" + hardStopperThreadIndex++); } @Override |