Skip to content

Commit

Permalink
CSSTUDIO-2051 Replace the data-structure SynchronousQueue with the da…
Browse files Browse the repository at this point in the history
…ta-structure LinkedBlockingDeque.
  • Loading branch information
abrahamwolk committed May 21, 2024
1 parent c67a75b commit 178f307
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

Expand Down Expand Up @@ -66,7 +66,7 @@ public static ExecutorService createThreadPool(final String name)
// Downside: No way to avoid a gazillion threads.
return new ThreadPoolExecutor(0, Integer.MAX_VALUE,
10L, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),
new LinkedBlockingDeque<>(),
new NamedThreadFactory(name));
}

Expand Down

0 comments on commit 178f307

Please sign in to comment.