add more locks to the pool

This commit is contained in:
Athou
2013-05-27 13:20:07 +02:00
parent 8c45fc41ec
commit 8f647a96e6

View File

@@ -66,7 +66,7 @@ public class FeedRefreshUpdater {
ApplicationSettings settings = applicationSettingsService.get();
int threads = Math.max(settings.getDatabaseUpdateThreads(), 1);
log.info("Creating database pool with {} threads", threads);
locks = Striped.lazyWeakLock(threads);
locks = Striped.lazyWeakLock(threads * 1000);
pool = new ThreadPoolExecutor(threads, threads, 0,
TimeUnit.MILLISECONDS,
queue = new ArrayBlockingQueue<Runnable>(500 * threads));