Directly from this oracle tutorial:
Interrupts
An interrupt is an indication to a thread that it should stop what it is doing and do something else. It's up to the programmer to decide exactly how a thread responds to an interrupt, but it is very common for the thread to terminate. This is the usage emphasized in this lesson.
"It's up to the programmer to decide.." Where is it possible to program that particular behaviour?Does "It's very common for the thread to terminate" means that the standard behaviour terminates the thread?
EDIT: For example we have the acquireUninterruptibly method from Sempaphore class which if receives an interrupt it just delays the waiting time of the amount of time that the interrupt caused to be interrupted. Probably in this case the interrupt handling consists of only a Thread.yield()? Thanks in advance.