摘要: from:http://www.cnblogs.com/shijingxiang/articles/5389294.html 近日需要将线程池封装成C++类,类名为Threadpool。在类的成员函数exec_task中调用pthread_create去启动线程执行例程thread_rounter。 阅读全文
posted @ 2016-09-13 19:58 jiu~ 阅读(3444) 评论(0) 推荐(0)
摘要: 涉及多参数传递给线程的,都需要使用结构体将参数封装后,将结构体指针传给线程 定义一个结构体 struct mypara { var para1;//参数1 var para2;//参数2 } 将这个结构体指针,作为void *形参的实际参数传递 struct mypara pstru; pthrea 阅读全文
posted @ 2016-09-13 19:17 jiu~ 阅读(19490) 评论(1) 推荐(3)