mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Allow custom ExecutorService to be supplied to the Loader
This commit is contained in:
parent
3f49f5c157
commit
68e65ec884
1 changed files with 8 additions and 2 deletions
|
|
@ -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…
Reference in a new issue