Hi all,
I am proceeding in building my
thread design and I am facing one issue with interrupting the working thread. There are two threads:
1- UI and listening to stop the working thread.
2- Working thread with many tasks in sequence.
I am passing the state flag to the working thread from the ui and working thread is checking the state from time to time. However, i have realized that cleaning up tasks is not enough since tasks will continue processing unless u check for intrerruption after every action!!!
How can I achieve this interruption and force all tasks and current thread to give up and stop? Did you do this before?
Thanks folks.