What is meant by Interrupt Status Flag ?

Discussion in 'Threads' started by vbraojava, Sep 30, 2008.

  1. vbraojava

    vbraojava New Member

    The Interrupt mechanism is implemented using an internal flag known as the Interrupt Status.

    - Invoking Thread.interrupt() sets this flag. When a Thread checks for an interrupt by invoking the static method Thread.interrupted(), interrupt status is cleared.

    - The non-static Thread.isInterrupted(), which is used by one thread to query the interrupt status of another, does not change the interrupt status flag.

    - By convention, any method that exits by throwing an InterruptedException clears interrupt status when it does so.

    - However, it's always possible that interrupt status will immediately be set again, by another thread invoking interrupt.
  2. anneroberts

    anneroberts Member

    Though (Interrupt Flag) may be an arrangement banner spot in the x86 architecture's FLAGS register, which determines if or not those cpu will handle maskable fittings interrupts.

Share This Page