Skip to content

Commit

Permalink
[GR-57584] Avoid using ThreadPoolExecutor#close since that's 19+
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Aug 26, 2024
1 parent 93bee43 commit f15f88d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,8 @@ private static void processFiles(List<String> fileNames) throws Exception {

int threadCount = Runtime.getRuntime().availableProcessors();

try (ThreadPoolExecutor threadPool = new ThreadPoolExecutor(threadCount, threadCount, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>())) {
ThreadPoolExecutor threadPool = new ThreadPoolExecutor(threadCount, threadCount, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>());
try {
List<Future<?>> tasks = new ArrayList<>();

for (String fileName : fileNames) {
Expand All @@ -755,6 +756,8 @@ private static void processFiles(List<String> fileNames) throws Exception {
for (Future<?> task : tasks) {
task.get();
}
} finally {
threadPool.shutdown();
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/mx/_impl/mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -18196,7 +18196,7 @@ def alarm_handler(signum, frame):
_CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache'))

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("7.29.4") # GR-57280 select_jdk sort order sometimes wrong
version = VersionSpec("7.29.5") # GR-57584

_mx_start_datetime = datetime.utcnow()

Expand Down

0 comments on commit f15f88d

Please sign in to comment.