Methods that Clear the Thread.interrupt() flag
问题 I have recently inherited a large Java Application that has almost no Thread safety in it. What I'm currently working on is getting all of the Threads to correctly handle being interrupted instead of using the very bad Thread.stop() . Part of the problem has been that I do not know every method call out there that clears the interrupt flag. Currently I know that the following will clear the interrupt flag: Thread.interrupted() Thread.sleep(long) Thread.join() Thread.join(long) Object.wait()