6829923: Test javax/swing/system/6799345/TestShutdown.java fails on X11 platforms
XAWT toolkit thread is correctly interrupted when AppContext is disposed Reviewed-by: anthony, peterz
This commit is contained in:
parent
7a543510bd
commit
fd76ca6d80
@ -565,6 +565,17 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
|
||||
{
|
||||
XEvent ev = new XEvent();
|
||||
while(true) {
|
||||
// Fix for 6829923: we should gracefully handle toolkit thread interruption
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
// We expect interruption from the AppContext.dispose() method only.
|
||||
// If the thread is interrupted from another place, let's skip it
|
||||
// for compatibility reasons. Probably some time later we'll remove
|
||||
// the check for AppContext.isDisposed() and will unconditionally
|
||||
// break the loop here.
|
||||
if (AppContext.getAppContext().isDisposed()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
awtLock();
|
||||
try {
|
||||
if (loop == SECONDARY_LOOP) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user