[Minor] keep scheduled thread pool as small as possible if idle

This commit is contained in:
Robert von Burg 2018-11-20 17:43:39 +01:00
parent fed452c52f
commit 3e71c6d5b5
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ public class StrolchAgent {
DBC.PRE.assertNotEmpty("poolName must be set!", poolName);
ScheduledExecutorService executor = this.scheduledExecutors.get(poolName);
if (executor == null) {
executor = Executors.newScheduledThreadPool(4, new ThreadPoolFactory(poolName));
executor = Executors.newScheduledThreadPool(0, new ThreadPoolFactory(poolName));
this.scheduledExecutors.put(poolName, executor);
}