Remove unused class (#2757)
This commit is contained in:
parent
a4ea1c9db2
commit
c872513896
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.javaagent.tooling;
|
||||
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
/** A {@link ThreadFactory} implementation that starts all {@link Thread} as daemons. */
|
||||
public final class DaemonThreadFactory implements ThreadFactory {
|
||||
public static final DaemonThreadFactory TASK_SCHEDULER =
|
||||
new DaemonThreadFactory("opentelemetry-task-scheduler");
|
||||
|
||||
private final String threadName;
|
||||
|
||||
/**
|
||||
* Constructs a new {@code DaemonThreadFactory} with a null ContextClassLoader.
|
||||
*
|
||||
* @param threadName used to prefix all thread names.
|
||||
*/
|
||||
public DaemonThreadFactory(String threadName) {
|
||||
this.threadName = threadName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Thread newThread(Runnable r) {
|
||||
Thread thread = new Thread(r, threadName);
|
||||
thread.setDaemon(true);
|
||||
thread.setContextClassLoader(null);
|
||||
return thread;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue