Fix for peer discovery thread pool config

This commit is contained in:
romanman 2014-05-22 21:10:52 +03:00
parent 4c19299167
commit 60a385742b
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ public class PeerDiscovery {
threadFactory = Executors.defaultThreadFactory(); threadFactory = Executors.defaultThreadFactory();
//creating the ThreadPoolExecutor //creating the ThreadPoolExecutor
executorPool = new ThreadPoolExecutor(1, config.peerDiscoveryWorkers(), 10, TimeUnit.SECONDS, executorPool = new ThreadPoolExecutor(1, 1000, 10, TimeUnit.SECONDS,
new ArrayBlockingQueue<Runnable>(2), threadFactory, rejectionHandler); new ArrayBlockingQueue<Runnable>(config.peerDiscoveryWorkers()), threadFactory, rejectionHandler);
//start the monitoring thread //start the monitoring thread
monitor = new PeerDiscoveryMonitorThread(executorPool, 3); monitor = new PeerDiscoveryMonitorThread(executorPool, 3);