我创建了一个线程,用于Socket监听
CWinThread *pThread;
pThread = AfxBeginThread(Listen,(LPVOID)tis,THREAD_PRIORITY_NORMAL,0,0);但是使用
pThread->SuspendThread;
却无法挂起线程,还是能够正常的监听连接,执行线程内代码
这是怎么回事???
怎么终止这个线程(无法暂停我就干掉它)???
CWinThread *pThread;
pThread = AfxBeginThread(Listen,(LPVOID)tis,THREAD_PRIORITY_NORMAL,0,0);但是使用
pThread->SuspendThread;
却无法挂起线程,还是能够正常的监听连接,执行线程内代码
这是怎么回事???
怎么终止这个线程(无法暂停我就干掉它)???
[in] Handle to the thread that is to be suspended.
The handle must have the THREAD_SUSPEND_RESUME access right. For more information, see Thread Security and Access Rights.只有带有 THREAD_SUSPEND_RESUME 访问权限的线程才能够被挂起