Hi,
I am trying to apply the approach that is provided in the Monkhouse book page 158 (of course with related changes to match the requirments of the B&S assignment).
in the enhanced reserveDvd(), in line number 32
dvdLock.unlock();
this causes IllegalMonitorStateException to raise in the enhanced releaseDVD() when I signal the matching condition.
but if I move that line to the releaseDVD() i don't get the exception.
why are we unlocking inside reserveDVD(), does it harm if i move it into the releaveDVD().
another issue is the waiting time, I believe it is not allowed in our assignment to use waiting time (the spec's didn't mention anything about it) right?
[ September 02, 2007: Message edited by: Musab Al-Rawi ]