I am having an intermittent problem with stuck threads due to network problems. What I would like to do is start and stop a timer at the start and end of my
thread and have an exception be thrown if the timer runs out (thread got stuck). The exception would get me out of my thread then I could just reset and restart it. The run() override in TimerTask can't throw an exception so I can't use that. Anyone come across options for this?