mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
actually set a capacity limit to the queue
This commit is contained in:
@@ -59,7 +59,8 @@ public class FeedRefreshUpdater {
|
||||
int threads = Math.max(settings.getDatabaseUpdateThreads(), 1);
|
||||
log.info("Creating database pool with {} threads", threads);
|
||||
pool = new ThreadPoolExecutor(threads, threads, 0,
|
||||
TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>());
|
||||
TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(
|
||||
100 * threads));
|
||||
pool.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy() {
|
||||
@Override
|
||||
public void rejectedExecution(Runnable r, ThreadPoolExecutor e) {
|
||||
|
||||
Reference in New Issue
Block a user