23,121
社区成员
发帖
与我相关
我的任务
分享
if (m_ThreadID > 0)
void Thread::Cancel() {
threadStatus = THREAD_STATUS_EXIT;
if(0 !=pthread_cancel(m_ThreadID))
perror("cancel");
cout << "thread cancel22 " << endl;
pthread_join(m_ThreadID, NULL);
m_ThreadID = 0;
cout << "thread cancel " << endl;
}