Added names to threads
This commit is contained in:
parent
5f5cf628ca
commit
5c8f2b6e37
|
@ -138,7 +138,7 @@ public class DownloadService extends Service {
|
||||||
requester = DownloadRequester.getInstance();
|
requester = DownloadRequester.getInstance();
|
||||||
|
|
||||||
syncExecutor = Executors.newSingleThreadExecutor(r -> {
|
syncExecutor = Executors.newSingleThreadExecutor(r -> {
|
||||||
Thread t = new Thread(r);
|
Thread t = new Thread(r, "SyncThread");
|
||||||
t.setPriority(Thread.MIN_PRIORITY);
|
t.setPriority(Thread.MIN_PRIORITY);
|
||||||
return t;
|
return t;
|
||||||
});
|
});
|
||||||
|
@ -146,7 +146,7 @@ public class DownloadService extends Service {
|
||||||
downloadExecutor = new ExecutorCompletionService<>(
|
downloadExecutor = new ExecutorCompletionService<>(
|
||||||
Executors.newFixedThreadPool(UserPreferences.getParallelDownloads(),
|
Executors.newFixedThreadPool(UserPreferences.getParallelDownloads(),
|
||||||
r -> {
|
r -> {
|
||||||
Thread t = new Thread(r);
|
Thread t = new Thread(r, "DownloadThread");
|
||||||
t.setPriority(Thread.MIN_PRIORITY);
|
t.setPriority(Thread.MIN_PRIORITY);
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ public class DownloadService extends Service {
|
||||||
);
|
);
|
||||||
schedExecutor = new ScheduledThreadPoolExecutor(SCHED_EX_POOL_SIZE,
|
schedExecutor = new ScheduledThreadPoolExecutor(SCHED_EX_POOL_SIZE,
|
||||||
r -> {
|
r -> {
|
||||||
Thread t = new Thread(r);
|
Thread t = new Thread(r, "DownloadSchedExecutorThread");
|
||||||
t.setPriority(Thread.MIN_PRIORITY);
|
t.setPriority(Thread.MIN_PRIORITY);
|
||||||
return t;
|
return t;
|
||||||
}, (r, executor) -> Log.w(TAG, "SchedEx rejected submission of new task")
|
}, (r, executor) -> Log.w(TAG, "SchedEx rejected submission of new task")
|
||||||
|
|
Loading…
Reference in New Issue