I am done with the coding of my project..URLYBird 1.1.2.It took me 120 hrs approx.
I have a requirement for my lock method which states that:
"If the specified record is already locked by a different
client, the current
thread gives up the CPU and consumes no CPU cycles until the record is unlocked".
I have implemented timeout and reentrant locks in my reservation lock manager class . I think that if a thread conditionally waits for a short timeout or until a lock is released (whichever comes earlier) would not consume CPU cycles,since after the timeout the thread gives up as opposed to blocking continously until the lock is released.
Is my understanding correct ?