make db-updater daemon thread

This commit is contained in:
Craig Raw 2022-03-13 10:56:58 +02:00
parent 9dcf3b7eea
commit d86517606b

View file

@ -166,7 +166,7 @@ public class DbPersistence implements Persistence {
private synchronized void createUpdateExecutor(Wallet masterWallet) { private synchronized void createUpdateExecutor(Wallet masterWallet) {
if(updateExecutor == null) { if(updateExecutor == null) {
BasicThreadFactory factory = new BasicThreadFactory.Builder().namingPattern(masterWallet.getFullName() + "-dbupdater").daemon(false).priority(Thread.NORM_PRIORITY).build(); BasicThreadFactory factory = new BasicThreadFactory.Builder().namingPattern(masterWallet.getFullName() + "-dbupdater").daemon(true).priority(Thread.NORM_PRIORITY).build();
updateExecutor = Executors.newSingleThreadExecutor(factory); updateExecutor = Executors.newSingleThreadExecutor(factory);
} }
} }