前言:
多线程程序中,特别是频繁申请,释放线程的情况下,就要注意线程的关闭,最好使用线程池。
一,线程退出方式
(1) 执行完成后隐式退出;
(2) 由线程本身显示调用pthread_exit 函数退出;
pthread_exit (void * retval) ;
(3) 被其他线程用pthread_c...
分类:
编程语言 时间:
2014-05-13 16:22:59
阅读次数:
286
---恢复内容开始---Example 1Creating and terminating
thread by usingpthread_create, pthread_exit(status)#include #include #include
using namespace std;#defin...
分类:
编程语言 时间:
2014-05-07 17:41:05
阅读次数:
335