From 1def7daa1cc0eff502b00d576feb013d8f07e7e5 Mon Sep 17 00:00:00 2001 From: Karthik Ramgopal Date: Tue, 16 Jan 2024 22:50:08 -0800 Subject: [PATCH] Fix checkstyle --- .../linkedin/avroutil1/builder/util/StreamUtil.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/avro-builder/builder-spi/src/main/java/com/linkedin/avroutil1/builder/util/StreamUtil.java b/avro-builder/builder-spi/src/main/java/com/linkedin/avroutil1/builder/util/StreamUtil.java index 641ed6c9..5d2fa523 100644 --- a/avro-builder/builder-spi/src/main/java/com/linkedin/avroutil1/builder/util/StreamUtil.java +++ b/avro-builder/builder-spi/src/main/java/com/linkedin/avroutil1/builder/util/StreamUtil.java @@ -1,9 +1,15 @@ +/* + * Copyright 2024 LinkedIn Corp. + * Licensed under the BSD 2-Clause License (the "License"). + * See License in the project root for license information. + */ + package com.linkedin.avroutil1.builder.util; import com.pivovarit.collectors.ParallelCollectors; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; -import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.SynchronousQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.function.Function; @@ -22,7 +28,7 @@ public final class StreamUtil { * sane values for parallelism to avoid spawning a crazy number of concurrent threads. */ private static final ExecutorService WORK_EXECUTOR = - new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60, TimeUnit.SECONDS, new LinkedBlockingQueue<>()); + new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60, TimeUnit.SECONDS, new SynchronousQueue<>()); private StreamUtil() { // Disallow external instantiation.