7011443: ./share/classes/sun/awt/SunToolkit.java needs to avoid spurious wakeup
authordcherepanov
Thu, 20 Jan 2011 14:28:40 +0300
changeset 7955 4faac2af1f6e
parent 7954 13aa14c7723e
child 7956 34a05c4d244f
7011443: ./share/classes/sun/awt/SunToolkit.java needs to avoid spurious wakeup Reviewed-by: anthony
jdk/src/share/classes/sun/awt/SunToolkit.java
--- a/jdk/src/share/classes/sun/awt/SunToolkit.java	Thu Jan 20 14:27:11 2011 +0300
+++ b/jdk/src/share/classes/sun/awt/SunToolkit.java	Thu Jan 20 14:28:40 2011 +0300
@@ -696,7 +696,9 @@
 
         synchronized (lock) {
             executeOnEventHandlerThread(event);
-            lock.wait();
+            while(!event.isDispatched()) {
+                lock.wait();
+            }
         }
 
         Throwable eventThrowable = event.getThrowable();