Math.max instead of .min

This commit is contained in:
Vankka 2021-09-20 23:05:01 +03:00
parent ebfefde8d8
commit 1dcb513e9a
No known key found for this signature in database
GPG Key ID: 6E50CB7A29B96AD0

View File

@ -42,7 +42,7 @@ public class StandardScheduler implements Scheduler {
new CountingThreadFactory(Scheduler.THREAD_NAME_PREFIX + "Executor #%s")
),
new ForkJoinPool(
Math.min(1, Runtime.getRuntime().availableProcessors() - 1), /* Parallelism - not core pool size */
Math.max(1, Runtime.getRuntime().availableProcessors() - 1), /* Parallelism - not core pool size */
new CountingForkJoinWorkerThreadFactory(Scheduler.THREAD_NAME_PREFIX + "ForkJoinPool Worker #%s"),
null,
false /* FIFO */