File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
alloydb-jdbc-connector/src/main/java/com/google/cloud/alloydb Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,15 @@ enum InternalConnectorRegistry implements Closeable {
6565 // there should be enough free threads so that there will not be a deadlock. Most users
6666 // configure 3 or fewer instances, requiring 6 threads during refresh. By setting
6767 // this to 8, it's enough threads for most users, plus a safety factor of 2.
68- this .executor = MoreExecutors .listeningDecorator (Executors .newScheduledThreadPool (8 ));
68+ this .executor =
69+ MoreExecutors .listeningDecorator (
70+ Executors .newScheduledThreadPool (
71+ 8 ,
72+ r -> {
73+ Thread t = new Thread (r );
74+ t .setDaemon (true );
75+ return t ;
76+ }));
6977 this .unnamedConnectors = new ConcurrentHashMap <>();
7078 this .namedConnectors = new ConcurrentHashMap <>();
7179 this .credentialFactoryProvider = new CredentialFactoryProvider ();
You can’t perform that action at this time.
0 commit comments