changeset 5830:3502753a9d66

7167780: Hang javasoft.sqe.tests.api.javax.swing.Timer.Ctor2Tests Reviewed-by: alexsch
author rupashka
date Wed, 25 Jul 2012 13:41:46 +0400
parents 8a5a71e853ed
children 1a410846d85b
files src/share/classes/javax/swing/TimerQueue.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/TimerQueue.java	Tue Jul 24 16:26:05 2012 +0400
+++ b/src/share/classes/javax/swing/TimerQueue.java	Wed Jul 25 13:41:46 2012 +0400
@@ -187,6 +187,9 @@
                                 addTimer(delayedTimer);
                             }
                         }
+
+                        // Allow run other threads on systems without kernel threads
+                        timer.getLock().newCondition().awaitNanos(1);
                     } catch (SecurityException ignore) {
                     } finally {
                         timer.getLock().unlock();