SunpendThread()函数中
MSDN的描述:
If the suspend count is greater than zero, the thread is suspended; otherwise, the thread is not suspended and is eligible for execution. 但我在测试的时候:
numSuspend = m_pThreadFun->SuspendThread();
TRACE(L"%d\n", numSuspend);
这里的numSunpend值为0.
也就是说首次执行些函数的时候,此值为0.
可否能够这样理解,当>=0的时候,线程就已经被挂起了。
能通过全局变量numSuspend来判断线程是否是挂起状态吗(如果>=0,就是被挂起)
MSDN的描述:
If the suspend count is greater than zero, the thread is suspended; otherwise, the thread is not suspended and is eligible for execution. 但我在测试的时候:
numSuspend = m_pThreadFun->SuspendThread();
TRACE(L"%d\n", numSuspend);
这里的numSunpend值为0.
也就是说首次执行些函数的时候,此值为0.
可否能够这样理解,当>=0的时候,线程就已经被挂起了。
能通过全局变量numSuspend来判断线程是否是挂起状态吗(如果>=0,就是被挂起)
是 > 0 ,不是 >=0