mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
set lower limit of 1 for max_worker_threads_count (for low-profile cpu)
This commit is contained in:
@@ -85,10 +85,10 @@ public class IncProjectBuilder {
|
||||
static {
|
||||
int maxThreads = Math.min(6, Runtime.getRuntime().availableProcessors() - 1);
|
||||
try {
|
||||
maxThreads = Math.max(2, Integer.parseInt(System.getProperty(GlobalOptions.COMPILE_PARALLEL_MAX_THREADS_OPTION, Integer.toString(maxThreads))));
|
||||
maxThreads = Math.max(1, Integer.parseInt(System.getProperty(GlobalOptions.COMPILE_PARALLEL_MAX_THREADS_OPTION, Integer.toString(maxThreads))));
|
||||
}
|
||||
catch (NumberFormatException ignored) {
|
||||
maxThreads = Math.max(2, maxThreads);
|
||||
maxThreads = Math.max(1, maxThreads);
|
||||
}
|
||||
MAX_BUILDER_THREADS = maxThreads;
|
||||
}
|
||||
@@ -569,7 +569,7 @@ public class IncProjectBuilder {
|
||||
|
||||
private void buildChunks(final CompileContextImpl context) throws ProjectBuildException {
|
||||
try {
|
||||
if (BuildRunner.PARALLEL_BUILD_ENABLED) {
|
||||
if (BuildRunner.PARALLEL_BUILD_ENABLED && MAX_BUILDER_THREADS > 1) {
|
||||
new BuildParallelizer(context).buildInParallel();
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user