Interrupting a thread that waits on a blocking action?
问题 I am running a thread whose main action is to call on a proxy using a blocking function , and wait for it to give it something. I've used the known pattern of a volatile boolean and the Interruption , but I'm not sure it will work: When I tried to add a catch block for InterruptedException , I get the error: Unreachable catch block for InterruptedException. This exception is never thrown from the try statement body So if I'm never going to get an InterruptedException , this means I'll never