EventDispatchThread.java (run): Stop running when interrupted.
* java/awt/EventDispatchThread.java (run): Stop running when interrupted. * java/awt/EventQueue.java (pop): Stop dispatch thread when done. Reset the queue after transferring its contents. (push): Start a new dispatch thread if none is running. From-SVN: r75977
This commit is contained in:
parent
5ed5fd905c
commit
101900aa28
3 changed files with 31 additions and 2 deletions
|
@ -62,8 +62,18 @@ class EventDispatchThread extends Thread
|
|||
try
|
||||
{
|
||||
AWTEvent evt = queue.getNextEvent();
|
||||
if (isInterrupted ())
|
||||
{
|
||||
// We are interrupted when we should finish executing
|
||||
return;
|
||||
}
|
||||
queue.dispatchEvent(evt);
|
||||
}
|
||||
catch (InterruptedException ie)
|
||||
{
|
||||
// We are interrupted when we should finish executing
|
||||
return;
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
System.err.println("Exception during event dispatch:");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue