Skip to content

Commit

Permalink
dump thread depending on env var and set name for Controller thread
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Dec 6, 2024
1 parent bfe8bba commit 742f8cb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ else if (installExtensions && (updateInfo.updateType == ConfigFactory.NEW_MINOR

controler = new Controler(cs, initContextes, 5 * 1000, controlerState);
controler.setDaemon(true);
controler.setName("Controller");
controler.setPriority(Thread.MIN_PRIORITY);

boolean disabled = Caster.toBooleanValue(SystemUtil.getSystemPropOrEnvVar(SystemUtil.SETTING_CONTROLLER_DISABLED, null), false);
Expand Down
5 changes: 4 additions & 1 deletion core/src/main/java/lucee/runtime/engine/Controler.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,20 @@ public void run() {
public void run() {
// scheduleThread.start();
boolean firstRun = true;
boolean dump = Caster.toBooleanValue(SystemUtil.getSystemPropOrEnvVar("lucee.dump.threads", null), false);
long count = 0;
List<ControlerThread> threads = new ArrayList<ControlerThread>();
CFMLFactoryImpl factories[] = null;
while (state.active()) {
dumpThreads();
if (dump) dumpThreads();
// sleep
SystemUtil.wait(this, interval);
if (!state.active()) break;

factories = toFactories(factories, contextes);
// start the thread that calls control
ControlerThread ct = new ControlerThread(this, factories, firstRun, configServer.getLog("application"));
ct.setName("ControllerThread:" + (++count));
ct.start();
threads.add(ct);

Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="6.2.0.181-SNAPSHOT"/>
<property name="version" value="6.2.0.182-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>6.2.0.181-SNAPSHOT</version>
<version>6.2.0.182-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down

0 comments on commit 742f8cb

Please sign in to comment.