I notice non daemon threads called m3-reporter-%d in my application that come from the use of the M3Reporter. Is there a good reason why its thread factory creates non daemon threads ? This prevents clean JVM exits. Its ofcourse trivial to fix but I would like to understand if there was some intended rationale behind not making them be daemon threads.
This is how the current thread factory used by M3Reporter looks like:
private static ThreadFactory createThreadFactory() {
return new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
return new Thread(r, String.format("m3-reporter-%d", processorThreadCounter.getAndIncrement()));
}
};
}
As you can see it creates non daemon threads. Why ?