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