Skip to content

Commit

Permalink
Allow custom ExecutorService to be supplied to the Loader
Browse files Browse the repository at this point in the history
  • Loading branch information
colinkho committed Jul 30, 2024
1 parent 3f49f5c commit 68e65ec
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,14 @@ public boolean isRetry() {
* component using the loader.
*/
public Loader(String threadNameSuffix) {
this.downloadExecutorService =
Util.newSingleThreadExecutor(THREAD_NAME_PREFIX + threadNameSuffix);
this(Util.newSingleThreadExecutor(THREAD_NAME_PREFIX + threadNameSuffix));
}

/**
* @param downloadExecutorService An {@link ExecutorService} for supplying the loader's thread.
*/
public Loader(ExecutorService downloadExecutorService) {
this.downloadExecutorService = downloadExecutorService;
}

/**
Expand Down

0 comments on commit 68e65ec

Please sign in to comment.