From af0560391e5c7eed4278f23378860f0674e9bcff Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Mon, 16 Dec 2024 16:20:51 +0100 Subject: [PATCH] LDEV-5205 allow configuring LUCEE_THREADS_MAXDEFAULT --- core/src/main/java/lucee/runtime/functions/closure/Each.java | 3 ++- core/src/main/java/resource/setting/sysprop-envvar.json | 5 +++++ loader/build.xml | 2 +- loader/pom.xml | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/lucee/runtime/functions/closure/Each.java b/core/src/main/java/lucee/runtime/functions/closure/Each.java index a027453cba..f41439fb84 100644 --- a/core/src/main/java/lucee/runtime/functions/closure/Each.java +++ b/core/src/main/java/lucee/runtime/functions/closure/Each.java @@ -53,7 +53,8 @@ public final class Each extends BIF implements ClosureFunc { - public static final int DEFAULT_MAX_THREAD = 20; + public static final int DEFAULT_MAX_THREAD = Caster.toIntValue(SystemUtil.getSystemPropOrEnvVar("lucee.threads.maxDefault", null), 20); + private static final long serialVersionUID = 1955185705863596525L; public static String call(PageContext pc, Object obj, UDF udf) throws PageException { diff --git a/core/src/main/java/resource/setting/sysprop-envvar.json b/core/src/main/java/resource/setting/sysprop-envvar.json index 7a08b49373..c1369ccb4a 100644 --- a/core/src/main/java/resource/setting/sysprop-envvar.json +++ b/core/src/main/java/resource/setting/sysprop-envvar.json @@ -391,5 +391,10 @@ "sysprop": "lucee.cache.variableKeys", "envvar": "LUCEE_CACHE_VARIABLEKEYS", "desc": "Sets the max number of variable names (keys) to cache" + }, + { + "sysprop": "lucee.threads.maxDefault", + "envvar": "LUCEE_THREADS_MAXDEFAULT", + "desc": "Sets the default max number of parallel threads, default 20" } ] \ No newline at end of file diff --git a/loader/build.xml b/loader/build.xml index 35a3ff2da1..f43a7b276e 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index 35af946d7c..ec9daa3721 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 6.2.0.217-SNAPSHOT + 6.2.0.218-SNAPSHOT jar Lucee Loader Build