Maximize thread pool worker thread count

This commit is contained in:
M66B
2022-11-15 10:55:47 +01:00
parent ada79e6db5
commit 7d78e88a9d

View File

@@ -260,6 +260,11 @@ public class Helper {
}
};
if (threads == 0) {
int processors = Runtime.getRuntime().availableProcessors();
threads = processors * 4;
}
if (threads == 0)
return new ThreadPoolExecutorEx(
name,