23,215
社区成员




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;
}