提交 66c1a407 编写于 作者: A art

6829923: Test javax/swing/system/6799345/TestShutdown.java fails on X11 platforms

Summary: XAWT toolkit thread is correctly interrupted when AppContext is disposed
Reviewed-by: anthony, peterz
上级 59e20a9f
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册