Allow custom ExecutorService to be supplied to the Loader
This commit is contained in:
parent
3f49f5c157
commit
68e65ec884
@ -214,8 +214,14 @@ public final class Loader implements LoaderErrorThrower {
|
|||||||
* component using the loader.
|
* component using the loader.
|
||||||
*/
|
*/
|
||||||
public Loader(String threadNameSuffix) {
|
public Loader(String threadNameSuffix) {
|
||||||
this.downloadExecutorService =
|
this(Util.newSingleThreadExecutor(THREAD_NAME_PREFIX + threadNameSuffix));
|
||||||
Util.newSingleThreadExecutor(THREAD_NAME_PREFIX + threadNameSuffix);
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param downloadExecutorService An {@link ExecutorService} for supplying the loader's thread.
|
||||||
|
*/
|
||||||
|
public Loader(ExecutorService downloadExecutorService) {
|
||||||
|
this.downloadExecutorService = downloadExecutorService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user