The last few days I have been struggling in the problem that my
program occasionally stops working with InterruptedExce ption, but this
exception is not thrown during a sleeping or a waiting stage. (This
may be determined from the stack trace - the thread is not apparently
in any sleep or wait stage.) Moreover, all the sleeps and waits are
correctly surrounded by try and catch. So it seems that for some
reason JVM realizes that it does not like some thread, and throws the
InterruptedExce ption.
program occasionally stops working with InterruptedExce ption, but this
exception is not thrown during a sleeping or a waiting stage. (This
may be determined from the stack trace - the thread is not apparently
in any sleep or wait stage.) Moreover, all the sleeps and waits are
correctly surrounded by try and catch. So it seems that for some
reason JVM realizes that it does not like some thread, and throws the
InterruptedExce ption.