大家好
利用_beginthread开起不线程为什么不能与程序同步运行呢?请大家帮忙解决,在线急等! Example:
_beginthread(setProgressPos,0,this);
Funct();
目的是为了能使得setProgressPos能与Funct()能同步执行.
利用_beginthread开起不线程为什么不能与程序同步运行呢?请大家帮忙解决,在线急等! Example:
_beginthread(setProgressPos,0,this);
Funct();
目的是为了能使得setProgressPos能与Funct()能同步执行.
setProgressPos
{
SetEvent(m_hEvent);
} _beginthread(setProgressPos,0,this);
WaitForSingleObject(m_hEvent);
Funct();可以基本保证同步