|
-
December 9th, 2005, 02:12 PM
#8
Re: Stop thread
Rather than terminating the thread, another approach would be to create a exit event (shared between both threads). With this approach, the secondary thread would periodically check to see if the event was set and exit if necessary. The primary thread (i.e. the controlling thread) would set this event when appropriate. As a backup, the primary thread could still terminate the thread if it fails to respond to the exit event. In general terminate thread should only be used as a last resort.
Arjay
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
|