aboutsummaryrefslogtreecommitdiff
path: root/runtime/src/main/java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-11-07 18:39:59 +0800
committershedaniel <daniel@shedaniel.me>2023-05-29 21:19:21 +0800
commite42038218c4814ecd66a3c567705aeee29b38d3d (patch)
tree9dcb3ec8e49b81dcead0406616661874c2fc2ce5 /runtime/src/main/java
parent535270b64db364d71ce212c8a35bb61eac1238ec (diff)
downloadRoughlyEnoughItems-e42038218c4814ecd66a3c567705aeee29b38d3d.tar.gz
RoughlyEnoughItems-e42038218c4814ecd66a3c567705aeee29b38d3d.tar.bz2
RoughlyEnoughItems-e42038218c4814ecd66a3c567705aeee29b38d3d.zip
Fix #1196
Diffstat (limited to 'runtime/src/main/java')
-rw-r--r--runtime/src/main/java/me/shedaniel/rei/impl/client/util/ThreadCreator.java3
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);