mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-18 03:43:15 +00:00
8148104: HSDB could not terminate when launched on CLI
Create frame before initialize SA Reviewed-by: jbachorik, dsamersoff
This commit is contained in:
parent
b41df1a2e7
commit
7e4e18045a
@ -141,16 +141,20 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
return;
|
||||
}
|
||||
|
||||
agent = new HotSpotAgent();
|
||||
workerThread = new WorkerThread();
|
||||
attachMenuItems = new java.util.ArrayList();
|
||||
detachMenuItems = new java.util.ArrayList();
|
||||
// Create frame first, to catch any GUI creation issues
|
||||
// before we initialize agent
|
||||
|
||||
frame = new JFrame("HSDB - HotSpot Debugger");
|
||||
frame.setSize(800, 600);
|
||||
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
|
||||
frame.addWindowListener(new CloseUI());
|
||||
|
||||
agent = new HotSpotAgent();
|
||||
workerThread = new WorkerThread();
|
||||
attachMenuItems = new java.util.ArrayList();
|
||||
detachMenuItems = new java.util.ArrayList();
|
||||
|
||||
|
||||
JMenuBar menuBar = new JMenuBar();
|
||||
|
||||
//
|
||||
|
||||
@ -35,7 +35,11 @@ public class WorkerThread {
|
||||
public WorkerThread() {
|
||||
mqb = new MessageQueueBackend();
|
||||
mq = mqb.getFirstQueue();
|
||||
new Thread(new MainLoop()).start();
|
||||
|
||||
// Enable to terminate this worker during runnning by daemonize.
|
||||
Thread mqthread = new Thread(new MainLoop());
|
||||
mqthread.setDaemon(true);
|
||||
mqthread.start();
|
||||
}
|
||||
|
||||
/** Runs the given Runnable in the thread represented by this
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user