vsulu
asked on
How To Kill a Thread completely
I have used two worker threads in my project which perform two different operations , i want to terminate the thread completely in the middle of the operation ,how do i use Afxendthread to kill it.
please explain me with an example, what does that parameter exitcode refer to.
I have for loops running in my thread which does lengthy operation
say when i press a button kill the thread has to be killed.
i am using worker thread.
even when i am using return statement inside the thread it does no get killed.
basically i am calling a member function inside the thread function,and in the thread function i have mentioned if th == NULL return false, wher th is pointing to the dialog.
please explain me with an example, what does that parameter exitcode refer to.
I have for loops running in my thread which does lengthy operation
say when i press a button kill the thread has to be killed.
i am using worker thread.
even when i am using return statement inside the thread it does no get killed.
basically i am calling a member function inside the thread function,and in the thread function i have mentioned if th == NULL return false, wher th is pointing to the dialog.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by : ambience, makerp (points to be split)
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Roshan Davis
EE Cleanup Volunteer