线程退出的三种方式

多线程退出有三种方式:
(1)执行完成后隐式退出;

(2)由线程本身显示调用pthread_exit 函数退出;
    pthread_exit (void * retval) ; 

(3)被其他线程用pthread_cancel函数终止:
    pthread_cancel (pthread_t thread) ; 

posted @ 2016-04-20 14:25  风也沉默  阅读(1932)  评论(0编辑  收藏  举报