File tree Expand file tree Collapse file tree 2 files changed +17
-38
lines changed
metrics/src/main/java/io/avaje/metrics Expand file tree Collapse file tree 2 files changed +17
-38
lines changed Original file line number Diff line number Diff line change 3
3
import io .avaje .applog .AppLog ;
4
4
5
5
import java .util .Objects ;
6
- import java .util .concurrent .Executors ;
7
- import java .util .concurrent .ScheduledExecutorService ;
8
- import java .util .concurrent .ScheduledFuture ;
9
- import java .util .concurrent .TimeUnit ;
6
+ import java .util .concurrent .*;
10
7
import java .util .concurrent .locks .ReentrantLock ;
11
8
12
9
import static java .lang .System .Logger .Level .ERROR ;
@@ -96,4 +93,20 @@ private void runTask() {
96
93
activeLock .unlock ();
97
94
}
98
95
}
96
+
97
+ private static final class DaemonThreadFactory implements ThreadFactory {
98
+
99
+ private final String name ;
100
+
101
+ DaemonThreadFactory (String name ) {
102
+ this .name = name ;
103
+ }
104
+
105
+ @ Override
106
+ public Thread newThread (Runnable r ) {
107
+ Thread t = new Thread (r , name );
108
+ t .setDaemon (true );
109
+ return t ;
110
+ }
111
+ }
99
112
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments