线程退出的三种方式

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

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

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

原文地址:https://www.cnblogs.com/ld1226/p/5412542.html