< prev index next >
src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java
Print this page
*** 39,49 ****
import java.util.stream.Stream;
import static sun.awt.shell.Win32ShellFolder2.*;
import sun.awt.OSInfo;
import sun.awt.util.ThreadGroupUtils;
- import sun.misc.ManagedLocalsThread;
// NOTE: This class supersedes Win32ShellFolderManager, which was removed
// from distribution after version 1.4.2.
/**
* @author Michael Martak
--- 39,48 ----
*** 522,533 ****
final Runnable shutdownHook = () -> AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
shutdownNow();
return null;
});
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
! Thread t = new ManagedLocalsThread(
! ThreadGroupUtils.getRootThreadGroup(), shutdownHook);
Runtime.getRuntime().addShutdownHook(t);
return null;
});
}
--- 521,533 ----
final Runnable shutdownHook = () -> AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
shutdownNow();
return null;
});
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
! Thread t = new Thread(
! ThreadGroupUtils.getRootThreadGroup(), shutdownHook,
! "ShellFolder", 0, false);
Runtime.getRuntime().addShutdownHook(t);
return null;
});
}
*** 546,557 ****
String name = "Swing-Shell";
/* The thread must be a member of a thread group
* which will not get GCed before VM exit.
* Make its parent the top-level thread group.
*/
! Thread thread = new ManagedLocalsThread(
! ThreadGroupUtils.getRootThreadGroup(), comRun, name);
thread.setDaemon(true);
return thread;
});
return comThread;
}
--- 546,558 ----
String name = "Swing-Shell";
/* The thread must be a member of a thread group
* which will not get GCed before VM exit.
* Make its parent the top-level thread group.
*/
! Thread thread = new Thread(
! ThreadGroupUtils.getRootThreadGroup(), comRun, name,
! 0, false);
thread.setDaemon(true);
return thread;
});
return comThread;
}
< prev index next >