Use create daemon threads in ThreadPoolTaskScheduler.
Use create daemon threads in ThreadPoolTaskScheduler to not prevent application shutdown if the ThreadPoolTaskScheduler is not shut down upon application exit. ThreadPoolTaskScheduler may stay active because the actual threads prevent a VM exit so the shutdown hook isn't called. Fixes gh-81.
This commit is contained in:
@@ -209,6 +209,7 @@ public class VaultBootstrapConfiguration implements InitializingBean {
|
||||
|
||||
ThreadPoolTaskScheduler threadPoolTaskScheduler = new ThreadPoolTaskScheduler();
|
||||
threadPoolTaskScheduler.setPoolSize(2);
|
||||
threadPoolTaskScheduler.setDaemon(true);
|
||||
threadPoolTaskScheduler.setThreadNamePrefix("Spring-Cloud-Vault-");
|
||||
|
||||
return new TaskSchedulerWrapper<>(threadPoolTaskScheduler);
|
||||
|
||||
Reference in New Issue
Block a user