changeset 3366:1bb32dc775c8

7011443: ./share/classes/sun/awt/SunToolkit.java needs to avoid spurious wakeup Reviewed-by: anthony
author dcherepanov
date Thu, 20 Jan 2011 14:28:40 +0300
parents 5d4723944cbd
children 4cd8718d4548
files src/share/classes/sun/awt/SunToolkit.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/awt/SunToolkit.java	Thu Jan 20 14:27:11 2011 +0300
+++ b/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();