jvr2
March 25th, 2004, 07:57 AM
Hello,
I'm writing a multithreaded application, using the CWinThread-class.
I create a thread :
m_pThread = AfxBeginThread(ThreadProc, this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED);
m_pThread->m_bAutoDelete = false;
The thread is started/pauzed by using :
m_pThread->ResumeThread();
m_pThread->SuspendThread();
I want to know if it's possible to check if the thread is currently 'running' or 'suspended'.
If the thread is suspended at that time, I don't want it to be started !
So, using the return value of ResumeThread is not an option.
J.
I'm writing a multithreaded application, using the CWinThread-class.
I create a thread :
m_pThread = AfxBeginThread(ThreadProc, this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED);
m_pThread->m_bAutoDelete = false;
The thread is started/pauzed by using :
m_pThread->ResumeThread();
m_pThread->SuspendThread();
I want to know if it's possible to check if the thread is currently 'running' or 'suspended'.
If the thread is suspended at that time, I don't want it to be started !
So, using the return value of ResumeThread is not an option.
J.