Tag Archives: 做为

Linux的pthread中,如何使用C++的类成员函数作为routine函数

参考了:http://blog.sina.com.cn/s/blog_4cce4f6a0100m6jw.html

pthread_create 是 POSIX 标准下创建线程的函数,函数原型是:
int pthread_create(pthread_t *thread, pthread_attr_t *attr, void*(*start_routine)(void *), void *arg);

在 C 中,这个函数使用很简单,只要定义一个参数和返回值均为 void * 类型的函[......]

继续阅读