mirror of
https://github.com/Qortal/qortal.git
synced 2025-11-02 15:07:02 +00:00
Reduce thread pool size for less resource use
This commit is contained in:
@@ -164,7 +164,7 @@ public class Network {
|
|||||||
maxPeers = Settings.getInstance().getMaxPeers();
|
maxPeers = Settings.getInstance().getMaxPeers();
|
||||||
|
|
||||||
// We'll use a cached thread pool but with more aggressive timeout.
|
// 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(),
|
Settings.getInstance().getMaxNetworkThreadPoolSize(),
|
||||||
NETWORK_EPC_KEEPALIVE, TimeUnit.SECONDS,
|
NETWORK_EPC_KEEPALIVE, TimeUnit.SECONDS,
|
||||||
new SynchronousQueue<Runnable>(),
|
new SynchronousQueue<Runnable>(),
|
||||||
|
|||||||
Reference in New Issue
Block a user