Skip to content

Commit 1965a33

Browse files
committed
+ using cached pool for admin tasks
1 parent f2aea5e commit 1965a33

File tree

3 files changed

+8
-33
lines changed

3 files changed

+8
-33
lines changed

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<modelVersion>4.0.0</modelVersion>
2828
<groupId>io.github.q3769</groupId>
2929
<artifactId>conseq4j</artifactId>
30-
<version>20230922.20230924.20240516</version>
30+
<version>20230922.20230924.20240521</version>
3131
<packaging>jar</packaging>
3232
<name>conseq4j</name>
3333
<description>A Java concurrent API to sequence related tasks while concurring unrelated ones</description>
@@ -186,19 +186,19 @@
186186
<dependency>
187187
<groupId>org.junit.jupiter</groupId>
188188
<artifactId>junit-jupiter-api</artifactId>
189-
<version>5.9.3</version>
189+
<version>5.10.2</version>
190190
<scope>test</scope>
191191
</dependency>
192192
<dependency>
193193
<groupId>org.junit.jupiter</groupId>
194194
<artifactId>junit-jupiter-params</artifactId>
195-
<version>5.9.3</version>
195+
<version>5.10.2</version>
196196
<scope>test</scope>
197197
</dependency>
198198
<dependency>
199199
<groupId>org.junit.jupiter</groupId>
200200
<artifactId>junit-jupiter-engine</artifactId>
201-
<version>5.9.3</version>
201+
<version>5.10.2</version>
202202
<scope>test</scope>
203203
</dependency>
204204
<dependency>
@@ -221,7 +221,7 @@
221221
<dependency>
222222
<groupId>io.github.q3769</groupId>
223223
<artifactId>coco4j</artifactId>
224-
<version>10.0.0</version>
224+
<version>10.1.0</version>
225225
</dependency>
226226
</dependencies>
227227
<properties>

src/main/java/conseq4j/execute/ConseqExecutor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import static coco4j.Tasks.callUnchecked;
2828

2929
import coco4j.DefensiveFuture;
30+
import coco4j.ThreadFactories;
3031
import conseq4j.Terminable;
3132
import java.util.List;
3233
import java.util.Map;
@@ -47,9 +48,8 @@
4748
@ToString
4849
public final class ConseqExecutor implements SequentialExecutor, Terminable, AutoCloseable {
4950
private static final int DEFAULT_WORKER_CONCURRENCY = Runtime.getRuntime().availableProcessors();
50-
private static final int ADMIN_WORKER_CONCURRENCY =
51-
Math.max(1, Runtime.getRuntime().availableProcessors() / 2);
52-
private final ExecutorService adminService = Executors.newWorkStealingPool(ADMIN_WORKER_CONCURRENCY);
51+
private final ExecutorService adminService =
52+
Executors.newCachedThreadPool(ThreadFactories.newPlatformThreadFactory("conseq4j-admin"));
5353
private final Map<Object, CompletableFuture<?>> activeSequentialTasks = new ConcurrentHashMap<>();
5454
/**
5555
* The worker thread pool facilitates the overall async execution, independent of the submitted tasks. Any thread

src/test/resources/elf4j-test.properties

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)