Click to See Complete Forum and Search --> : Suspend a thread from inside a thread


asafaa
November 18th, 2004, 06:48 AM
I want to suspend a thread from inside the thread, can i do that ?

After i suspend it from inside the thread , how can i know from outside the thread that he is suspended or not, is there a CWinThread function who checks that ?

VictorN
November 18th, 2004, 06:51 AM
I want to suspend a thread from inside the thread, can i do that ?You could read about "Pausing a Thread and Thread Shutdown" in this very useful J.Newcome's article: Using Worker Threads (http://www.flounder.com/workerthreads.htm#Pausing%20a%20Thread)

Andreas Masur
November 18th, 2004, 07:21 AM
[ Moved thread ]

Andreas Masur
November 18th, 2004, 07:27 AM
I want to suspend a thread from inside the thread, can i do that
??
You want to suspend a different thread or the current thread itself? In the former case, take a look at

'SuspendThread()'
'ResumeThread()'

for the latter one answer the following question: Why??