I have read http://www.ibm.com/developerworks/java/library/j-jtp05236/index.html
I decide to make my lock uncancelable task by
try {
lockedRecords.wait();
} catch (InterruptedException e) {
interrupted = true;
}
but is there a need to
} finally {
if (interrupted) {
Thread.currentThread().interrupt();
}
}
The article says that you should call interrupt() to preserve the interrupted status. I'm still very blur, so what if I set .interrupt? what happens next? a bit lost on this.. any input?
What value does it bring to my program? Please kindly explain in layman terms, greatly appreciated :D