Hi, I refactoring my URLyBird - the lock manager and I have a dilemma. In my lock method I use a spin look - something like :
My dilemma is about the InterruptedException, or better about its treatment. Here I only log it, is this correct ? I don't think that can be useful to inform the user(with an other exception let's say).
Regards, Mihai [ April 10, 2006: Message edited by: Mihai Radulescu ]
Tahnks for your answer. The only reason why I catch the InterruptedExceptoin is to be shore that a "accidental" wakeup will not change (drastic) the workflow - the locked thread leave the while loop even if the varaible condition(the records.containsKey(recId)) is not accomplish, this can lead easly to a dead look. By example if some client(front end) is implemented and in this client the someone just try to call the interrupt() metohd in a try/catch block then the the lock manager can be skiped -> records can be altered without locking.