Java / Java Multithreading
Explain the interrupt mechanism.
The internal flag "interrupt status" tracks the status. Thread.interrupt() sets this flag and this flag is reset when Thread.interrupted (static) method is invoked to check the interruption status.
The non-static isInterrupted method, which queries the interrup status of another, does not change the interrupt status flag.
Also once the InterruptedException is thrown, the status is cleared.
More Related questions...