【发布时间】:2020-12-11 12:11:15
【问题描述】:
Linux 手册页将 pthread_create 函数定义为
int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
void *(*start_routine) (void *), void *arg);
这个指向 pthread_t 的指针是做什么用的?我们可以说它是一个线程处理程序吗?
【问题讨论】:
-
如果有的话,它是指向存储线程 handle 的变量的指针,而不是 handler。