8237038: Shenandoah: Reduce thread pool size in TestEvilSyncBug.java test
Reviewed-by: shade
This commit is contained in:
parent
87c5a28403
commit
27d782be64
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016, 2018, Red Hat, Inc. All rights reserved.
|
* Copyright (c) 2016, 2020, Red Hat, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
@ -49,8 +49,9 @@ public class TestEvilSyncBug {
|
|||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
test();
|
test();
|
||||||
} else {
|
} else {
|
||||||
ExecutorService pool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
|
// Use 1/4 of available processors to avoid over-saturation.
|
||||||
|
int numJobs = Math.max(1, Runtime.getRuntime().availableProcessors() / 4);
|
||||||
|
ExecutorService pool = Executors.newFixedThreadPool(numJobs);
|
||||||
Future<?>[] fs = new Future<?>[NUM_RUNS];
|
Future<?>[] fs = new Future<?>[NUM_RUNS];
|
||||||
|
|
||||||
for (int c = 0; c < NUM_RUNS; c++) {
|
for (int c = 0; c < NUM_RUNS; c++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user