Do not override user-specified max.bg.threads
This commit is contained in:
parent
44322a7d07
commit
12a0414f61
|
|
@ -95,6 +95,10 @@ public class ModernFixMixinPlugin implements IMixinConfigPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void computeBetterThreadCount() {
|
private void computeBetterThreadCount() {
|
||||||
|
// Allow user-provided thread count to take precedence
|
||||||
|
if (System.getProperty("max.bg.threads") != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Server thread + client thread + GC thread
|
// Server thread + client thread + GC thread
|
||||||
int reservedCores = 3;
|
int reservedCores = 3;
|
||||||
int availableBackgroundCores = Math.max(1, Runtime.getRuntime().availableProcessors() - reservedCores);
|
int availableBackgroundCores = Math.max(1, Runtime.getRuntime().availableProcessors() - reservedCores);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user