Clear context class loader from started threads
This commit is contained in:
parent
80094155e9
commit
41415e5115
|
|
@ -252,6 +252,7 @@ final class StrictContextStorage implements ContextStorage, AutoCloseable {
|
|||
thread.setName("weak-ref-cleaner-strictcontextstorage");
|
||||
thread.setPriority(Thread.MIN_PRIORITY);
|
||||
thread.setDaemon(true);
|
||||
thread.setContextClassLoader(null);
|
||||
thread.start();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ public final class LeakDetectingSpanProcessor implements SpanProcessor {
|
|||
thread.setName("weak-ref-cleaner-leakingspandetector");
|
||||
thread.setPriority(Thread.MIN_PRIORITY);
|
||||
thread.setDaemon(true);
|
||||
thread.setContextClassLoader(null);
|
||||
thread.start();
|
||||
return pendingSpans;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ public final class DaemonThreadFactory implements ThreadFactory {
|
|||
try {
|
||||
t.setDaemon(true);
|
||||
t.setName(namePrefix + "-" + counter.incrementAndGet());
|
||||
t.setContextClassLoader(null);
|
||||
} catch (SecurityException e) {
|
||||
// Well, we tried.
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue