Skip to content

Commit

Permalink
make executor create daemon thread
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinayagarwal committed Sep 10, 2024
1 parent 321aafe commit 71ca413
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ public CompletableFuture<Boolean> initialize() {
LOG.log(Level.SEVERE, "Downloading of sprites failed", e);
return false;
}
}, Executors.newSingleThreadExecutor());
}, Executors.newSingleThreadExecutor(r -> {
Thread t = Executors.defaultThreadFactory().newThread(r);
t.setDaemon(true);
return t;
}));
}

private void downloadSprites(int... sizes) {
Expand Down

0 comments on commit 71ca413

Please sign in to comment.