Why Do We Need Thread.currentThread().interrupt() in Interruptible Methods?

Why Do We Need Thread.currentThread().interrupt() in Interruptible Methods?

By an interruptible method, we mean a blocking method that may throwInterruptedException, for example, Thread.sleep(),  BlockingQueue.take(),  BlockingQueue.poll(long timeout, TimeUnit unit), and so on. A blocking thread is usually in a BLOCKED, WAITING, or TIMED_WAITING state, and if it is interrupted, then the method tries to throw InterruptedException as soon as possible.

Since InterruptedException is a checked exception, we must catch it and/or throw it. In other words, if our method calls a method that throws InterruptedException, then we must be prepared to deal with this exception. If we can throw it (propagate the exception to the caller), then it is not our job anymore. The caller has to deal with it further. So, let's focus on the case when we must catch it. Such a case can occur when our code is run inside Runnable, which cannot throw an exception.