i have read it on
http://download.oracle.com/javase/tutorial/essential/concurrency/interrupt.html that
if a
thread goes a long time without invoking a method that throws InterruptedException, then it must periodically invoke Thread.interrupted,
which returns true if an interrupt has been received.
If i am rightly understood the statement it means do we have to hadle interrup check in our code ,if thread goes a long time without invoking
a method that throws InterruptedException? Is it correct?
considering the below example if the interruption comes during sleep it will print the message
but if the interruption comes once the thread comes out of sleep it wont go inside catch block for InterruptedException
} correct?