Set number of parallel downloads to 4

This commit is contained in:
daniel oeh 2012-08-18 13:45:08 +02:00
parent 1d890208e0
commit bd2d65f6f9
1 changed files with 3 additions and 1 deletions

View File

@ -99,6 +99,8 @@ public class DownloadService extends Service {
private ExecutorService syncExecutor;
private ExecutorService downloadExecutor;
/** Number of threads of downloadExecutor. */
private static final int NUM_PARALLEL_DOWNLOADS = 4;
private DownloadRequester requester;
private FeedManager manager;
@ -168,7 +170,7 @@ public class DownloadService extends Service {
return t;
}
});
downloadExecutor = Executors.newFixedThreadPool(2, new ThreadFactory() {
downloadExecutor = Executors.newFixedThreadPool(NUM_PARALLEL_DOWNLOADS, new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {