Skip to content

Commit

Permalink
common: Rename new method
Browse files Browse the repository at this point in the history
  • Loading branch information
kohlschuetter committed Apr 15, 2024
1 parent f4b545a commit f309bf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static boolean isVirtualThreadSupported() {
*
* @return The new executor service.
*/
public static ExecutorService newVirtualThreadPerTaskExecutorIfPossible() {
public static ExecutorService newVirtualThreadOrCachedThreadPoolExecutor() {
if (isVirtualThreadSupported()) {
return Executors.newVirtualThreadPerTaskExecutor();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void testAcceptConnect() throws Exception {
serverSocket.bind(listenAddr, numServerThreads);

ExecutorService esServers = Executors.newFixedThreadPool(numServerThreads);
ExecutorService esClients = ThreadUtil.newVirtualThreadPerTaskExecutorIfPossible();
ExecutorService esClients = ThreadUtil.newVirtualThreadOrCachedThreadPoolExecutor();

CountDownLatch cl = new CountDownLatch(numConnections);

Expand Down

0 comments on commit f309bf4

Please sign in to comment.