src/java.management/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java
Print this page
rev 14181 : 8147553: Remove sun.misc.ManagedLocalsThread from java.management
Reviewed-by:
@@ -50,11 +50,10 @@
import javax.management.remote.TargetedNotification;
import com.sun.jmx.remote.util.ClassLogger;
import com.sun.jmx.remote.util.EnvHelp;
import java.rmi.UnmarshalException;
-import sun.misc.ManagedLocalsThread;
public abstract class ClientNotifForwarder {
private final AccessControlContext acc;
@@ -89,11 +88,12 @@
public synchronized void execute(Runnable command) {
if (this.command != null)
throw new IllegalArgumentException("More than one command");
this.command = command;
if (thread == null) {
- thread = new ManagedLocalsThread(
+ thread = new Thread(
+ null,
()-> {
while (true) {
Runnable r;
synchronized (LinearExecutor.this) {
if (LinearExecutor.this.command == null) {
@@ -105,11 +105,13 @@
}
}
r.run();
}
},
- "ClientNotifForwarder-" + ++threadId
+ "ClientNotifForwarder-" + ++threadId,
+ 0,
+ false
);
thread.setDaemon(true);
thread.start();
}
}