Add option to switch ExecutorService to ForkJoinPool for potentially better performance.
In order to try it out, do this:
bazel --host_jvm_args=-Dexperimental_use_fork_join_pool query ...
RELNOTES: None
@@ -149,6 +149,9 @@ public class AbstractQueueVisitor implements QuiescingExecutor {
TimeUnit units,
BlockingQueue<Runnable> workQueue,
String poolName) {
+ if (System.getProperty("experimental_use_fork_join_pool") != null) {
+ return new NamedForkJoinPool(poolName, parallelism);
+ }
return new ThreadPoolExecutor(
/*corePoolSize=*/ parallelism,
/*maximumPoolSize=*/ parallelism,
