diff --git a/src/tools/diskcache/Gc.java b/src/tools/diskcache/Gc.java index c678e5bfeb9258..04eeed4d810ad2 100644 --- a/src/tools/diskcache/Gc.java +++ b/src/tools/diskcache/Gc.java @@ -13,7 +13,7 @@ // limitations under the License. package diskcache; -import static java.lang.Math.min; +import static java.lang.Math.max; import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.devtools.build.lib.remote.disk.DiskCacheGarbageCollector; @@ -75,7 +75,7 @@ public static final class Options extends OptionsBase { private static final ExecutorService executorService = Executors.newFixedThreadPool( - min(4, Runtime.getRuntime().availableProcessors()), + max(4, Runtime.getRuntime().availableProcessors()), new ThreadFactoryBuilder().setNameFormat("disk-cache-gc-%d").build()); public static void main(String[] args) throws Exception {