摘要:基本概念pthread_cancel调用并不等待线程终止,它只提出请求。线程在取消请求(pthread_cancel)发出后会继续运行,直到到达某个取消点(CancellationPoint)。取消点是线程检查是否被取消并按照请求进行动作的一个位置.与线程取消相关的pthread函数int pthread_cancel(pthread_t thread)发送终止信号给thread线程,如果成功则返回0,否则为非0值。发送成功并不意味着thread会终止。int pthread_setcancelstate(int state, int *oldstate) 设置本线程对Cancel信号的反应,
        
阅读全文