forked from Archives/Athou_commafeed
add more locks to the pool
This commit is contained in:
@@ -66,7 +66,7 @@ public class FeedRefreshUpdater {
|
|||||||
ApplicationSettings settings = applicationSettingsService.get();
|
ApplicationSettings settings = applicationSettingsService.get();
|
||||||
int threads = Math.max(settings.getDatabaseUpdateThreads(), 1);
|
int threads = Math.max(settings.getDatabaseUpdateThreads(), 1);
|
||||||
log.info("Creating database pool with {} threads", threads);
|
log.info("Creating database pool with {} threads", threads);
|
||||||
locks = Striped.lazyWeakLock(threads);
|
locks = Striped.lazyWeakLock(threads * 1000);
|
||||||
pool = new ThreadPoolExecutor(threads, threads, 0,
|
pool = new ThreadPoolExecutor(threads, threads, 0,
|
||||||
TimeUnit.MILLISECONDS,
|
TimeUnit.MILLISECONDS,
|
||||||
queue = new ArrayBlockingQueue<Runnable>(500 * threads));
|
queue = new ArrayBlockingQueue<Runnable>(500 * threads));
|
||||||
|
|||||||
Reference in New Issue
Block a user