Well, I have a thread in my video converter which is responsible for transcoding the video. It is a user thread
with setDaemon(false)
.
To stop it, I call the threadName.interrupt()
method however, it does not stop. It continues on !
How do I stop it?
Here is how I try to stop it:
if(getExecutingTaskID() == taskID){
int what = JOptionPane.showOptionDialog(frame,
"Do you want to interrupt an executing task?",
"Task already running",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, null, null);
if(what == JOptionPane.YES_OPTION){
if(getExecutingTaskID() == taskID){
converter.interrupt();
}
return true;
}
}
return false;
}