changeset 5262:589c21e1aa30

7167780: Hang javasoft.sqe.tests.api.javax.swing.Timer.Ctor2Tests Reviewed-by: rupashka
author vkarnauk
date Mon, 27 Aug 2012 21:38:54 +0400
parents d50a753bf368
children 226981134147
files src/share/classes/javax/swing/TimerQueue.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/TimerQueue.java	Mon Aug 27 10:23:43 2012 +0800
+++ b/src/share/classes/javax/swing/TimerQueue.java	Mon Aug 27 21:38:54 2012 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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();