Interrupt a thread when an action occurs and then resume it?
<p>I will use a thread object called <strong>TaskThread</strong> to execute certain tasks (TimerTasks actually). All the timer tasks are run by one thread only. The user of my program can interrupt this thread any time they want. When the interrupt occurs, a <strong>method</strong> will run and the <strong>TaskThread</strong> can resume only after that <strong>method</strong> completes. </p>

<p>Is it possible to do this in Java ? </p>
