From 30ec391b79590fb586e3a04d5b01625cb585e027 Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Wed, 25 Jul 2012 13:41:46 +0400 Subject: [PATCH] 7167780: Hang javasoft.sqe.tests.api.javax.swing.Timer.Ctor2Tests Reviewed-by: alexsch --- jdk/src/share/classes/javax/swing/TimerQueue.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jdk/src/share/classes/javax/swing/TimerQueue.java b/jdk/src/share/classes/javax/swing/TimerQueue.java index 463ff4713c3..91747dd1a77 100644 --- a/jdk/src/share/classes/javax/swing/TimerQueue.java +++ b/jdk/src/share/classes/javax/swing/TimerQueue.java @@ -187,6 +187,9 @@ class TimerQueue implements Runnable addTimer(delayedTimer); } } + + // Allow run other threads on systems without kernel threads + timer.getLock().newCondition().awaitNanos(1); } catch (SecurityException ignore) { } finally { timer.getLock().unlock();