Skip to main content

"Thread.currentThread().isInterrupted()" Always False?

No replies
RPZaRzXwO1Vn0ySqv7yH
Offline
Joined: 2013-11-20
Points: 0

The docs suggest that "isInterrupted" returns the interrupt result regardless of whether it is the interrupted reference or the current thread:
http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#isInterru...

Yet in practice it seems Java only returns true from that method when it's the interrupted reference. Perhaps it only fails to work with "Thread.currentThread()". Regardless, the current behavior is confusing.