Pardners,
I have a midlet which creates a
thread, and if the user clicks 'Cancel' then I want the new thread to quit processing.
The new thread is called otaThread (it does some httpconnection stuff).
In my commandAction method I have:
public void commandAction(....) {
if (c == commandCancel) {
otaThread = null;
}
}
but the otaThread just keeps on going! Is there any way I can stop it. I have considered creating a flag (e.g., isCancelButtonPressed) which the otaThread could poll periodically, but is there a better way that anyone could suggest?
Thanks,
James