我创建了一个CWinThread线程
在InitInstance中的一个地方我需要再启动这个线程
如
BOOL CThTest::InitInstance()
{
// TODO: perform and per-thread initialization here
while(TRUE)
{
TRACE("Thread RUNNING...\n");
......
if ( !bTest )
{
//如何在这里再启动这个线程
}
......
Sleep(10);
}
return TRUE;
}
应该怎么做
请教,谢谢!
在InitInstance中的一个地方我需要再启动这个线程
如
BOOL CThTest::InitInstance()
{
// TODO: perform and per-thread initialization here
while(TRUE)
{
TRACE("Thread RUNNING...\n");
......
if ( !bTest )
{
//如何在这里再启动这个线程
}
......
Sleep(10);
}
return TRUE;
}
应该怎么做
请教,谢谢!
CWinThread* AfxBeginThread(
CRuntimeClass* pThreadClass,
int nPriority = THREAD_PRIORITY_NORMAL,
UINT nStackSize = 0,
DWORD dwCreateFlags = 0,
LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL
);
{
// TODO: perform and per-thread initialization here
while(TRUE)
{
TRACE("Thread RUNNING...\n");
......
if ( !bTest )
{
AfxBeginThread(RUNTIME_CLASS(CMyWinThread));
}
......
Sleep(10);
}
return TRUE;
}