|
-
May 25th, 2012, 03:51 PM
#9
Re: Stop a Thread
 Originally Posted by cbpetro
... It seems to me, there may be three conditions you may want to account for....
No, as noted by VictorN, that's not correct. The thread ends when the thread function exits, so there is nothing left to "resume".
It is, of course, possible to write code for a thread pool, i.e., a pool of threads that sit idle until an event signals them that there is work to do. In such an architecture, threads can be "paused" and they can be "resumed". But that seems like something that you should aspire to in the future, not today.
For now, simply allow the thread to exit. If a user wants to start new thread-related work, then simply create a new thread.
Mike
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
|