From 4b28e8a487a82fd7f846c34c67e9245177a8c64a Mon Sep 17 00:00:00 2001 From: Clint Valentine Date: Sat, 23 Jan 2021 22:53:08 -0500 Subject: [PATCH] Always use the logical processor count for system max cores --- .gitignore | 3 +++ core/src/main/scala/dagr/core/execsystem/Resource.scala | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index d809639b..2d3d8570 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,6 @@ # Build tool specific target + +# jEnv +.java-version diff --git a/core/src/main/scala/dagr/core/execsystem/Resource.scala b/core/src/main/scala/dagr/core/execsystem/Resource.scala index ae476b75..ea0aceaa 100644 --- a/core/src/main/scala/dagr/core/execsystem/Resource.scala +++ b/core/src/main/scala/dagr/core/execsystem/Resource.scala @@ -24,18 +24,13 @@ package dagr.core.execsystem import oshi.SystemInfo -import oshi.hardware.platform.mac.MacHardwareAbstractionLayer /** Manipulates system resources */ object Resource { private val hal = new SystemInfo().getHardware /** Total number of cores in the system */ - val systemCores : Cores = - if (hal.isInstanceOf[MacHardwareAbstractionLayer]) - Cores(this.hal.getProcessor.getPhysicalProcessorCount) - else - Cores(this.hal.getProcessor.getLogicalProcessorCount) + val systemCores: Cores = Cores(this.hal.getProcessor.getLogicalProcessorCount) /** The total amount of memory in the system. */ val systemMemory: Memory = new Memory(this.hal.getMemory.getTotal)