3
0
mirror of https://github.com/Qortal/qortal.git synced 2025-02-11 17:55:50 +00:00

Reduce thread pool size for less resource use

This commit is contained in:
AlphaX-Reloaded 2024-11-01 12:23:15 +01:00
parent 881d9c9635
commit 941847dd98

View File

@ -164,7 +164,7 @@ public class Network {
maxPeers = Settings.getInstance().getMaxPeers();
// We'll use a cached thread pool but with more aggressive timeout.
ExecutorService networkExecutor = new ThreadPoolExecutor(4,
ExecutorService networkExecutor = new ThreadPoolExecutor(2,
Settings.getInstance().getMaxNetworkThreadPoolSize(),
NETWORK_EPC_KEEPALIVE, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),