Skip to content

Commit

Permalink
MDUMLCS-29045 Resolved high CPU usage at idle by mitigating JDK-81298…
Browse files Browse the repository at this point in the history
…61 bug.
  • Loading branch information
ivan-gomes committed Sep 7, 2018
1 parent ae03277 commit 8e51d14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/gov/nasa/jpl/mbee/mdk/util/TaskRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
import java.util.function.BiFunction;

public class TaskRunner {
private static final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(0);
// Cannot set corePoolSize to 0 due to bug that causes high CPU usage https://bugs.openjdk.java.net/browse/JDK-8129861
private static final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);

public static Future<?> runWithProgressStatus(Runnable runnable, String title, ThreadExecutionStrategy strategy) {
return runWithProgressStatus(runnable, title, strategy, false);
Expand Down

0 comments on commit 8e51d14

Please sign in to comment.