#15 FiniteQueue blockingdequeue don't respect timeout

General
open
nobody
5
2003-10-16
2003-10-16
Anonymous
No

FiniteQueue timed out blocking dequeue does not respect
prescribes timeout:
(oh, that's a shocker...damn FiniteQueue)

In all blocking calls (timed out),
the the timeout does not decrease.

//if (timeout_millis == -1)
// blocker.wait();
//else
// blocker.wait(timeout_millis);

Should be this:

if (timeout_millis == -1)
blocker.wait();
else {
long delay = goal_time -System.currentTimeMillis();
if(delay>0)
blocker.wait(delay);
}

Discussion