-
Bug
-
Resolution: Done
-
Major
-
1.2.2
-
None
For some reason, I am not seeing waitFor timeout properly.
See forum thread where I talk to myself about this issue
http://community.jboss.org/message/535224
Here's the patch:
Index: Waiter.java
===================================================================
— Waiter.java (revision 372)
+++ Waiter.java (working copy)
@@ -46,19 +46,22 @@
public void waitFor(long millisecs)
{
long start = System.currentTimeMillis();
- long waitFor = millisecs == 0 ? 0 : millisecs;
+ long waitForMillis = millisecs;
synchronized(this) {
waiting = true; - while (!signalled && waitFor >= 0){
+ while (!signalled && waitForMillis >= 0){
try { - this.wait(waitFor);
+ if (waitForMillis == 0 && millisecs > 0) { + break; + }+ this.wait(waitForMillis);
{ // ignore }
} catch (InterruptedException e)
if (!signalled)
{ - waitFor = millisecs == 0 ? 0 : millisecs + start - System.currentTimeMillis(); + waitForMillis = (millisecs == 0) ? 0 : millisecs + start - System.currentTimeMillis(); } }
if (signalled) {