Can I delete CWinThread (m_bAutoDelete = false) even It hasn't finished
-
Hello all, I have several CWinThread which I created using AfxBeginThread m_bAutoDelete = FALSE ResumeThread After I perform WaitForSingleObject and time out occur (which mean the CWinThread is still running), can I still safely delete them? Thank you very much
-
Hello all, I have several CWinThread which I created using AfxBeginThread m_bAutoDelete = FALSE ResumeThread After I perform WaitForSingleObject and time out occur (which mean the CWinThread is still running), can I still safely delete them? Thank you very much
yccheok wrote:
can I still safely delete them?
u mean terminateing a thread using the TerminateThread() function. Read the remark section of the TerminateThread function in the msdn. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/terminatethread.asp[^]
nave
-
Hello all, I have several CWinThread which I created using AfxBeginThread m_bAutoDelete = FALSE ResumeThread After I perform WaitForSingleObject and time out occur (which mean the CWinThread is still running), can I still safely delete them? Thank you very much
See
TerminateThread(...)
_**
**_
WhiteSky