[findbugs] Avoid futile attempt to change max pool size
Javadoc for ScheduledThreadPoolExecutor says [1]: While ScheduledThreadPoolExecutor inherits from ThreadPoolExecutor, a few of the inherited tuning methods are not useful for it. In particular, because it acts as a fixed-sized pool using corePoolSize threads and an unbounded queue, adjustments to maximumPoolSize have no useful effect. [1] http://download.oracle.com/javase/6/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html Change-Id: I8eccb7d6544aa6e27f5fa064c19dddb2a706523f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
f67e5602af
commit
a02e8e3d26
|
@ -74,7 +74,6 @@ public Thread newThread(Runnable taskBody) {
|
|||
return thr;
|
||||
}
|
||||
});
|
||||
alarmQueue.setMaximumPoolSize(alarmQueue.getCorePoolSize());
|
||||
alarmQueue.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);
|
||||
alarmQueue.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
|
||||
alarmQueue.prestartAllCoreThreads();
|
||||
|
|
Loading…
Reference in New Issue