diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-11-07 18:39:59 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2022-11-08 00:59:36 +0800 |
| commit | 90aa14c886a26b0667ccedd8ece51ce637e60918 (patch) | |
| tree | 9f8ddfe562d7ba91c4a172957b41d58da5098148 | |
| parent | cc0a9d92954de3609ee2b3983630fa8d2cf8ac55 (diff) | |
| download | RoughlyEnoughItems-90aa14c886a26b0667ccedd8ece51ce637e60918.tar.gz RoughlyEnoughItems-90aa14c886a26b0667ccedd8ece51ce637e60918.tar.bz2 RoughlyEnoughItems-90aa14c886a26b0667ccedd8ece51ce637e60918.zip | |
Fix #1196
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/client/util/ThreadCreator.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/util/ThreadCreator.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/util/ThreadCreator.java index 6815d7c56..7526d670c 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/client/util/ThreadCreator.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/util/ThreadCreator.java @@ -23,6 +23,7 @@ package me.shedaniel.rei.impl.client.util; +import dev.architectury.platform.Platform; import me.shedaniel.rei.impl.common.InternalLogger; import java.util.concurrent.*; @@ -56,7 +57,7 @@ public final class ThreadCreator { } public ExecutorService asService() { - return new ThreadPoolExecutor(0, Runtime.getRuntime().availableProcessors() * 4, + return new ThreadPoolExecutor(0, Platform.isFabric() ? (Runtime.getRuntime().availableProcessors() * 4) : Integer.MAX_VALUE, 0L, TimeUnit.SECONDS, new SynchronousQueue<>(), this::create); |
