Skip to content

Commit

Permalink
Merge pull request quarkusio#43648 from franz1981/main_queue_limited
Browse files Browse the repository at this point in the history
Bump jboss-threads version to 3.8.0.Final and disable queue size tracking
  • Loading branch information
gsmet authored Oct 8, 2024
2 parents d96b0f6 + e12a377 commit 2ec63e9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<wildfly-client-config.version>1.0.1.Final</wildfly-client-config.version>
<wildfly-elytron.version>2.6.0.Final</wildfly-elytron.version>
<jboss-marshalling.version>2.2.1.Final</jboss-marshalling.version>
<jboss-threads.version>3.6.1.Final</jboss-threads.version>
<jboss-threads.version>3.8.0.Final</jboss-threads.version>
<vertx.version>4.5.10</vertx.version>
<httpclient.version>4.5.14</httpclient.version>
<httpcore.version>4.4.16</httpcore.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ final class Execution {
this.finalIds = finalIds;
final EnhancedQueueExecutor.Builder executorBuilder = new EnhancedQueueExecutor.Builder();
executorBuilder.setRegisterMBean(false);
executorBuilder.setQueueLimited(false);
executorBuilder.setCorePoolSize(8).setMaximumPoolSize(1024);
executorBuilder.setExceptionHandler(JBossExecutors.loggingExceptionHandler());
executorBuilder.setThreadFactory(new JBossThreadFactory(new ThreadGroup("build group"), Boolean.FALSE, null, "build-%t",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public Class<?> loadClass(String name) throws ClassNotFoundException {
@Override
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
if (name.startsWith("org.") && !(name.startsWith("org.xml.") || name.startsWith("org.w3c.")
|| name.startsWith("org.jboss."))) {
|| (name.startsWith("org.jboss.") && !name.startsWith("org.jboss.logging.")))) {
//jbang has some but not all the maven resolver classes we need on its
//class path. These all start with org. so we filter them out to make sure
//we get a complete class path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,12 @@ private static EnhancedQueueExecutor createExecutor(ThreadPoolConfig threadPoolC
if (threadPoolConfig.queueSize.isPresent()) {
if (threadPoolConfig.queueSize.getAsInt() < 0) {
builder.setMaximumQueueSize(Integer.MAX_VALUE);
builder.setQueueLimited(false);
} else {
builder.setMaximumQueueSize(threadPoolConfig.queueSize.getAsInt());
}
} else {
builder.setQueueLimited(false);
}
builder.setGrowthResistance(threadPoolConfig.growthResistance);
builder.setKeepAliveTime(threadPoolConfig.keepAliveTime);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,12 @@ private ExecutorService internalCreateExecutor(ThreadFactory threadFactory, Inte
if (conf.queueSize().isPresent()) {
if (conf.queueSize().getAsInt() < 0) {
builder.setMaximumQueueSize(Integer.MAX_VALUE);
builder.setQueueLimited(false);
} else {
builder.setMaximumQueueSize(conf.queueSize().getAsInt());
}
} else {
builder.setQueueLimited(false);
}
builder.setGrowthResistance(conf.growthResistance());
builder.setKeepAliveTime(conf.keepAliveTime());
Expand Down

0 comments on commit 2ec63e9

Please sign in to comment.