The Linux man page defines the pthread_create function as
int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
void *(*start_routine) (void *), void *arg);
What's this pointer to the pthread_t used for? Can we say it's a thread handler?
From the manpage of pthread_create :
See pthread_self(3) for further information on the thread ID returned in
*thread
bypthread_create()
.
You can also call it a handle (not handler).
You can use that ID for pthread_join
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.