-
November 16th, 2012, 06:29 AM
#1
Terminate a thread
Hi,
I have a thread with a while(1) loop in it. When the user push the stop button I would like that thread to end.
I thought about creating a bool and checking its value periodically in the thread and when I push the stop
button I change the value of the bool for that the thread breaks out of the loop and finishes.
Is it the best way to go about it, that's how professional programmers do it also?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|