diff --git a/microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmark.java b/microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmark.java index 301facdb2f..fc29b03e14 100644 --- a/microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmark.java +++ b/microbench/src/test/java/io/netty/microbench/util/AbstractMicrobenchmark.java @@ -30,7 +30,7 @@ import org.openjdk.jmh.runner.options.ChainedOptionsBuilder; import org.openjdk.jmh.runner.options.OptionsBuilder; import java.io.File; -import java.util.concurrent.SynchronousQueue; +import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; @@ -49,8 +49,8 @@ public class AbstractMicrobenchmark { public static final class HarnessExecutor extends ThreadPoolExecutor { public HarnessExecutor(int maxThreads, String prefix) { - super(0, maxThreads, 1L, TimeUnit.DAYS, new SynchronousQueue(), - new DefaultThreadFactory(prefix)); + super(maxThreads, maxThreads, 0, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(), new DefaultThreadFactory(prefix)); System.out.println("Using harness executor"); } }